YUM repository is the default repository available for RHEL-based systems. However, there are external repositories that can be enabled for RHEL-based systems which have additional packages that are not available on the system default repository. These external packages include EPEL, REMI, RPMFusion, ElRepo, Webtactic, and NUX-dextop repositories.
EPEL repository which stands for Extra Packages for Enterprise Linux is a Special interest Group (SIG) that was formed from Fedora Project to provide additional packages for RHEL, CentOS, AlmaLinux, and other systems from Fedora sources. Packages included in the EPEL repository follow the Fedora Packaging Guidelines by including packages that are free and open-source software that are patent-free. Packages that are available in RHEL are not in EPEL so as to avoid conflicts. Packages in EPEL include Perl, Python, Ruby gems, and other extras for programming languages.
REMI repository is a third-party repository that provides packages that are not in your system repository by default. It is free and mainly provides PHP packages that are updated and not found in the system by default.
This guide shows you how to install EPEL and REMI Repositories on CentOS 9|AlmaLinux 9| RHEL 9
Enable EPEL on CentOS 9|AlmaLinux 9|RHEL 9
First, enable the Core Ready Builder for Linux which contains a set of tools that might be needed to build applications.
For RHEL 9, Use the following command to Enable Code Ready Builder and Install the EPEL repo.
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
For CentOS 9, use the following command to Enable Code Ready builder for Linux to install the EPEL repo.
sudo dnf config-manager --set-enabled crb
sudo dnf install epel-release epel-next-release
For AlmaLinux 9, Use the following command to Enable Code Ready builder for Linux and install the EPEL repo.
sudo dnf config-manager --set-enabled crb
sudo dnf install epel-release
To check if the repo has been enabled, run the following command
sudo dnf repolist
You can use the following command to check which packages are available from EPEL.
sudo dnf --disablerepo="*" --enablerepo="epel" list available
To search for a specific package, use the grep option.
sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep <package name>
For example, if I am looking for the Ark package. I would search it as shown below.
$ sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep ark
ark.x86_64 21.08.3-1.el9 epel
ark-libs.x86_64 21.08.3-1.el9 epel
You can enable the repo temporarily on runtime while installing a package with the following command.
sudo dnf --enablerepo="epel" install <package name>
Enable REMI on CentOS 9|AlmaLinux 9| RHEL 9
You should have EPEL repo enabled to install REMI packages. If not, Enable the EPEL repo first.
Install the REMI
$ sudo dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : remi-release-9.0-6.el9.remi.noarch 1/1
Verifying : remi-release-9.0-6.el9.remi.noarch 1/1
Installed:
remi-release-9.0-6.el9.remi.noarch
Check the repolist to ensure it has been enabled.
sudo dnf repolist
You can enable REMI temporarily while installing a package with the following syntax.
sudo dnf --enablerepo=remi [command] [package name]
To enable REMI permanently, edit the repo file
sudo nano /etc/yum.repos.d/remi.repo
Set the enabled field to 1
[remi]
enabled=1
Save and exit the file, then execute the following to update the system.
sudo dnf update
Conclusion
This guide showed you how to install EPEL and REMI repositories on CentOS 9|AlmaLinux 9| RHEL 9 Linux Distributions. Both repositories provide a way to install additional packages that are not available in the system default repository and use with the Enterprise Linux Distributions.
Other guides to check out:
- Enable EPEL and REMI on CentOS 9|AlmaLinux 9|RHEL 9
- How To Install AlmaLinux 9 – Step by Step With Screenshots