How to Install EPEL on CentOS Stream EL9 or EL8


EPEL (Extra Packages for Enterprise Linux) is a community-driven project that provides additional software packages for Enterprise Linux distributions such as CentOS, Red Hat Enterprise Linux (RHEL), and Scientific Linux. These packages are built and maintained by a group of volunteers and are compatible with the corresponding version of the Enterprise Linux distribution.

Benefits of using EPEL include:

  • Access to a wide range of additional software packages not included in the base distribution
  • Consistent and reliable package management
  • Compatibility with the base distribution’s package management tools

Features of EPEL include:

  • A wide range of software packages across various categories, such as system utilities, web servers, and programming languages
  • A dedicated quality assurance team that ensures packages meet a set of guidelines and standards
  • Regularly updated packages to address security vulnerabilities and bug fixes.

This tutorial will show you how to install the EPEL (Extra Packages for Enterprise Linux) repository and the EPEL Next repository on your CentOS Stream 9 or 8 distribution.

Step 1: Update CentOS Stream

It is important to update your system before proceeding with the tutorial to ensure that all existing packages are up to date and to prevent any conflicts from occurring during the installation process.

sudo dnf upgrade --refresh

Step 2: Install EPEL and EPEL Next

Installing EPEL is relatively easy; ensure you choose the correct method for your CentOS Stream distribution version.

Import EPEL and EPEL Next on CentOS 9 Stream

Initially, activate the CRB repository. CRB, for those unfamiliar, is the new repository for tools for CentOS Stream, taking the place of the older PowerTools repository.

sudo dnf config-manager --set-enabled crb

Now use the following terminal command (dnf) to install EPEL.

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

For users who don’t need or want EPEL Next, you can remove it by simply deleting the last line.

Example output:

Import EPEL and EPEL Next on CentOS 8 Stream

Compared to CentOS 9, you do not need to enable power tools for EPEL; instead, just run the following 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

As with CentOS 9 Stream, remove the Next repository line if you do not want it installed.

Step 3: Confirm EPEL Installation

Verifying the installation is a good idea now that the EPEL repository has been installed. The most straightforward and quickest method to do this is by using the dnf repolist command.

dnf repolist | grep epel

Example output:

As mentioned earlier, the repository is displayed and has been successfully installed.

Step 4: EPEL Repository Command Examples

Next, the tutorial will run through a couple of commands you may find handy in your terminal searching the repository.

To list all the packages that are available in the EPEL repository, use the command:

dnf list available --enablerepo=epel

To search for a specific package in the EPEL repository, use the command:

dnf search package-name --enablerepo=epel

To install a package from the EPEL repository, use the command:

dnf install package-name --enablerepo=epel

To check for updates on packages installed from the EPEL repository, use the command:

dnf check-update --enablerepo=epel

Additional Commands & Tips

Remove (Uninstall) EPEL

Ideally, the EPEL repository should not have to be removed after it is installed, but if necessary, use the following command to remove it.

Remove EPEL repository:

sudo dnf remove epel-release

Remove EPEL Next repository:

sudo dnf remove epel-next-release

Conclusion

Installing EPEL on CentOS Stream is a simple process that can significantly enhance the functionality of your system. Users can access a wide range of additional packages unavailable in the default CentOS repository by enabling the EPEL repository.

See also
How to Install Redis on Fedora Linux

Leave a Comment

Share to...