How To Enable EPEL Repository in RHEL and Compatible Derivatives
This guide shows how to enable the EPEL repository on Red Hat Enterprise Linux (RHEL) and its compatible derivatives such as Rocky Linux, AlmaLinux, and more.
What is the EPEL repository?
The EPEL (short for Extra Packages for Enterprise Linux) repository is a community-driven repository of “extra” software packages that are not included in the official repositories of Red Hat Enterprise Linux (RHEL) and its derivatives, such as CentOS, Scientific Linux (SL), Oracle Linux (OL), AlmaLinux (AL) and Rocky Linux (RL).
The EPEL community is a Fedora Special Interest Group(SIG) that creates, maintains, and manages collections of high-quality additional packages for Enterprise Linux.
The EPEL repository contains a large number of extra packages that may be installed using normal package management tools like yum and dnf. These packages provide software programs, libraries, and tools that are commonly used by RHEL developers, system administrators, and users.
Why was EPEL Created?
EPEL was created in response to the desire of many Fedora contributors to use the Fedora packages they maintain on RHEL and the aforementioned compatible derivatives.
To enable the EPEL repository on your EL version, run the appropriate set of commands in the next sections.
Enable EPEL on EL 9
#subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms #dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
AlmaLinux 9, Rocky Linux 9
#dnf config-manager --set-enabled crb #dnf install epel-release
CentOS Stream 9
#dnf config-manager --set-enabled crb #dnf install epel-release epel-next-release
Enable EPEL on EL 8
#subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms #dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
AlmaLinux 8, Rocky Linux 8
#dnf config-manager --set-enabled powertools #dnf install epel-release
CentOS Stream 8
#dnf config-manager --set-enabled powertools #dnf install epel-release epel-next-release
Enable EPEL on EL 7
#subscription-manager repos --enable rhel-*-optional-rpms --enable rhel-*-extras-rpms --enable rhel-ha-for-rhel-*-server-rpms #yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
#yum install epel-release
Install Packages from EPEL
Once the EPEL repository is enabled on your system, you can search for and install packages from it using the yum or dnf command, just like you would for packages in the official repositories. This example shows how to install the glances monitoring tool:
#yum install glances OR #dnf install glances
I showed how to enable the EPEL repository on RHEL and its compatible variants such as CentOS, Rocky Linux, AlmaLinux, Oracle Linux, and others in this guide. Don’t forget to share your feedback via the comment form below.