CentOS Stream 9
Sponsored Link

Initial Settings : Add Additional Repositories
2021/12/16
 
Add some useful external repositories to install useful softwares.
[1] Add EPEL that Fedora project provides packages which are specially built for RHEL.
⇒ https://fedoraproject.org/wiki/EPEL
[root@dlp ~]#
dnf -y install https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/e/epel-release-9-2.el9.noarch.rpm
[root@dlp ~]#
vi /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux $releasever - $basearch
# It is much more secure to use the metalink, but if you wish to use a local mirr
ror
# place its address here.
#baseurl=https://download.example/pub/epel/$releasever/Everything/$basearch/
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$$
basearch&infra=$infra&content=$contentdir
# [enabled=1] = repository enabled, [enabled=0] = repository disabled
enabled=1
# to add [priority=*], it can set priority to repository
# it can specify [1-99], [1] is highest, default without the line is [99]
priority=10
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever

.....
.....

# if disabling with [enabled=0] regulary but want to enable it temporary, run like follows

[root@dlp ~]#
dnf --enablerepo=epel install [Package]

[2] Add Remi's RPM repository that provides useful packages like latest PHP and so on.
⇒ https://rpms.remirepo.net/
[root@dlp ~]#
dnf -y install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
# included repository files

[root@dlp ~]#
rpm -ql remi-release

/etc/pki/rpm-gpg/RPM-GPG-KEY-remi
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2017
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2018
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2019
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2020
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2021
/etc/yum.repos.d/remi-modular.repo
/etc/yum.repos.d/remi-safe.repo
/etc/yum.repos.d/remi.repo
/opt/remi

# only [remi-safe] and [remi-modular] are enabled by default

[root@dlp ~]#
grep 'enabled=1' /etc/yum.repos.d/remi-*

/etc/yum.repos.d/remi-modular.repo:enabled=1
/etc/yum.repos.d/remi-safe.repo:enabled=1
[root@dlp ~]#
vi /etc/yum.repos.d/remi-safe.repo
[remi-safe]
name=Safe Remi's RPM repository for Enterprise Linux 9 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/9/safe/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/9/safe/$basearch/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/9/safe/$basearch/mirror
# [enabled=1] = repository enabled, [enabled=0] = repository disabled
enabled=1
# to add [priority=*], it can set priority to repository
# it can specify [1-99], [1] is highest, default without the line is [99]
priority=10
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9

.....
.....

# if disabling with [enabled=0] regulary but want to enable it temporary, run like follows

[root@dlp ~]#
dnf --enablerepo=remi-safe install [Package]
# also possible to use Moduler Repository

[root@dlp ~]#
dnf --enablerepo=remi-modular --disablerepo=appstream module list

Remi's Modular repository for Enterprise Linux 9 - x86_64
Name      Stream   Profiles                    Summary
composer  2 [d]    common [d]                  Dependency Manager for PHP
memcached remi     common [d]                  High Performance, Distributed Memory Object Cache
php       remi-7.4 common [d], devel, minimal  PHP scripting language
php       remi-8.0 common [d], devel, minimal  PHP scripting language
php       remi-8.1 common [d], devel, minimal  PHP scripting language
redis     remi-5.0 common [d]                  Redis persistent key-value database
redis     remi-6.0 common [d]                  Redis persistent key-value database
redis     remi-6.2 common [d]                  Redis persistent key-value database

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Matched Content