Linux Tutorials

Install EPEL Repository on RHEL or CentOS Stream

install epel rhel rocky linux
enable epel on rhel or centos stream linux

How do you enable the EPEL repository on RHEL or CentOS Stream? EPEL stands for Extra Packages for Enterprise Linux, and it offers a wide range of additional software packages not included in the default repositories. This repository is maintained by the Fedora EPEL team, who ensure it provides high-quality, reliable packages for RHEL, CentOS, Scientific Linux, and Oracle Linux systems.

Original content from computingforgeeks.com - post 9935

RHEL, CentOS, Scientific Linux, and Oracle Linux distributions are designed for performance and stability with a limited number of packages in their Base repositories. If you’re a Developer, there are high chances some of the packages you need are not available. EPEL repository bridge this gap by providing additional stable packages that work for most use cases on enterprise Linux systems.

See How to Install CentOS 8 Linux

Install EPEL Repository on RHEL / CentOS Stream

EPEL has been released officially to the general public. Installation of EPEL repository is so easy as this is done by running the following command.

  • EL 9
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
  • EL 8
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

This will download the repository file to /etc/yum.repos.d/epel.repo and enables it. Here is the installation output.

...
Transaction Summary
============================================================================================================
Install  1 Package

Total size: 21 k
Installed size: 30 k
Is this ok [y/N]: y

For CentOS Stream

On CentOS Stream it is recommended to also enable the PowerTools repository since EPEL packages may depend on packages from it:

sudo dnf config-manager --set-enabled crb

For RHEL 9 / 8

  • on RHEL it is required to also enable the codeready-builder-for-rhel-x-*-rpms repository since EPEL packages may depend on packages from it:

RHEL 9

ARCH=$( /bin/arch )
sudo subscription-manager repos --enable "codeready-builder-for-rhel-9-${ARCH}-rpms"

RHEL 8:

ARCH=$( /bin/arch )
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

Confirm EPEL installation

You can confirm EPEL repository addition and functionality by running the following command.

$ sudo dnf repolist epel
repo id                                                                    repo name                                                                                                         status
epel                                                                       Extra Packages for Enterprise Linux 8 - x86_64                                                                    enabled

List packages available on EPEL repository.

sudo dnf --disablerepo="*" --enablerepo="epel" list available

You can filter further to check if the required package is available on EPEL repository.

sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep <package>

Example:

sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep chromium

To install package from EPEL repository, just run

sudo dnf --enablerepo="epel" install <package>

Example:

sudo dnf --enablerepo="epel" install chromium

Some dependencies may be installed from the Base repositories. There you have it, you can install your favorite packages from the EPEL repository. We hope you enjoy!.

Conclusion

You have seen how easy it is to enable the EPEL 8 repository on CentOS 8 / RHEL 8 Linux system. We used an installer that automatically created a .repo file under /etc/yum.repos.d directory. You can disable the repository at any time by turning off the enabled flag.

Also check How to enable REMI repository on CentOS/RHEL 8

Other interesting guides:

Related Articles

CentOS Install and Configure Virtualmin on CentOS 8 | RHEL 8 CentOS Setup x11vnc server on Linux with android vnc clients Virtualization How To Install Vagrant on Rocky 8 / RHEL 8 CentOS Install Apache Solr on CentOS / Fedora / Rocky Linux

2 thoughts on “Install EPEL Repository on RHEL or CentOS Stream”

  1. If the below command doesn’t work-
    sudo dnf config-manager –set-enabled PowerTools

    Try with this-
    sudo dnf config-manager –set-enabled powertools

    Reply

Leave a Comment

Press ESC to close