EPEL, which stands for Extra Packages for Enterprise Linux, is an open-source and free repository that provides extra packages for Enterprise Linux which can be beneficial on CentOS Stream 9 or 8 distributions. The following tutorial will teach you how to install and enable EPEL on your CentOS Stream system.
What is EPEL?
Extra Packages for Enterprise Linux (EPEL) is a Linux software repository providing high-quality additional packages for Enterprise Linux distributions such as Red Hat Enterprise Linux (RHEL), CentOS, Rocky Linux, etc. EPEL was founded to provide enterprise users access to open-source packages that are distressed from the standard repositories. It offers an extensive list of all the important software packages, including library, system-level utilities, and application-level software, ensuring that users of all kinds have all their necessities in one conveniently accessible platform.
Recommended Steps Before Installation
Before proceeding with the tutorial, update your system to ensure all existing packages are up to date.
sudo dnf upgrade --refresh
Import EPEL & EPEL Next Repository
The first task is to install the EPEL repository. The recommendation is to install both repositories. Ensure you match your version of CentOS Stream with the correct EPEL repository.
Import EPEL for CentOS Stream 9
First, enable the CRB.
sudo dnf config-manager --set-enabled crb
Next, install EPEL using the following (dnf) terminal command.
sudo dnf install \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
Import EPEL for CentOS Stream 8
Like CentOS 9 Stream, install EPEL using the following (dnf) terminal command for CentOS 8 Stream distribution.
sudo dnf install \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm
Confirm the EPEL or EPEL Next Installation
Now that you have installed the EPEL repository, verifying the installation is a good idea. The easiest and quickest way is to use the dnf repolist command.
dnf repolist | grep epel
[[email protected] ~]$ dnf repolist | grep epel epel Extra Packages for Enterprise Linux 9 - x86_64 epel-next Extra Packages for Enterprise Linux 9 - Next - x86_64
As mentioned above, the repository is shown and successfully installed.
EPEL Repository Tips
One of the handy tricks when using EPEL or EPEL Next repository is to list the available packages.
dnf --disablerepo="*" --enablerepo="epel" list available
The example will find phpMyAdmin.
sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep -i phpMyAdmin
EPEL Next Example:
sudo dnf --disablerepo="*" --enablerepo="epel-next" list available | grep -i phpMyAdmin
phpMyAdmin.noarch 5.2.0-1.el9 epel
Now that you have found the EPEL containing the packages you want to install, use the following command to install them straight out of the EPEL repository.
Example (Replace with your package name):
sudo dnf --enablerepo="epel" install phpMyAdmin
Alternatively, users with EPEL Next can use the following command if a newer package exists.
sudo dnf --enablerepo="epel-next" install phpMyAdmin
Note that you can often not use the –enablerepo and use the standard installation command. However, this doesn’t always work when multiple options are present.
How to Remove (Uninstall) EPEL or EPEL Next
Ideally, you should not need to remove the repository once installed. However, if you must remove it, use the following command.
Remove the EPEL repository
sudo dnf remove epel-release
Remove EPEL Next repository
sudo dnf remove epel-next-release
Comments and Conclusion
EPEL is a repository you will want on your Enterprise Linux distribution system as it contains many packages that are not found in the default repositories. This tutorial showed you how to install and configure EPEL on CentOS Stream. Be sure to check out the other options for using this repository too!