How to Install the EPEL Repository on RHEL 8 and CentOS 8

EPEL stands for “Extra Packages for Enterprise Linux”, developed and maintained by the Fedora Special Interest Group.

They create, maintain and manage additional quality packages for Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux (OL) for Enterprise Linux.

The EPEL packages are based on the Fedora distribution, where the RHEL team tests and executes new things before bringing them in RHEL.

As such, it will never conflict or replace the core packages in enterprise Linux distributions.

EPEL uses the same infrastructure as Fedora, which includes the build system, bugzilla instance, updates manager, mirror manager and more.

It enables the user to install valuable packages that are not shipped with the official repository of Enterprise Linux.

It works 100% correctly without any problems and is completely free. Check the following link to see a list of packages available in the EPEL repository. The EPEL repository currently supports up to 6328 packages.

How to Install the EPEL Repository on RHEL and CentOS Systems

Visit the EPEL page and download the corresponding version of the EPEL release based on your OS version and install it using the yum command.

The commands below will download the epel.repo repository under the /etc/yum.repos.d/ directory and enables it.

The EPEL repository is included in the Centos Extras repository and is enabled by default. So you can easily install it by running the below command.

For CentOS 6/7/8 Systems.

# yum install epel-release

For RHEL 6 System.

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

For RHEL 7 System.

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

In RHEL 7 it is recommended to run optional, extras and HA repositories because the EPEL packages may depend on the packages coming from these repositories.

# subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"

For RHEL 8 System.

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

It is recommended to enable the codeready, and PowerTools repositories on RHEL 8 because EPEL packages may depend on packages from these repositories.

# subscription-manager repos --enable "codeready-builder-for-rhel-8-*-rpms"

# dnf config-manager --set-enabled PowerTools

2) How to Check if the EPEL Repository is Enabled on the System

You can confirm the addition of the EPEL repository by executing the following command.

# yum repolist epel

Last metadata expiration check: 0:00:27 ago on Sat 09 Nov 2019 10:04:29 AM IST.
repo id                    repo name                                                          status
*epel                      Extra Packages for Enterprise Linux 8 - x86_64                     2,911

3) How to Check the List of Packages Available in the EPEL Repository

Run the command below to list the packages available in the EPEL repository.

# yum --disablerepo="*" --enablerepo="epel" list available | more
Last metadata expiration check: 0:03:56 ago on Sat 09 Nov 2019 10:04:29 AM IST.

Available Packages
BackupPC.x86_64                                    4.3.1-3.el8                            epel
BackupPC-XS.x86_64                                 0.59-3.el8                             epel
CGSI-gSOAP.x86_64                                  1.3.11-7.el8                           epel
CGSI-gSOAP-devel.x86_64                            1.3.11-7.el8                           epel
Field3D.x86_64                                     1.7.2-16.el8                           epel
Field3D-devel.x86_64                               1.7.2-16.el8                           epel
GraphicsMagick.x86_64                              1.3.33-1.el8                           epel
GraphicsMagick-c++.x86_64                          1.3.33-1.el8                           epel
GraphicsMagick-c++-devel.x86_64                    1.3.33-1.el8                           epel
GraphicsMagick-devel.x86_64                        1.3.33-1.el8                           epel
GraphicsMagick-doc.noarch                          1.3.33-1.el8                           epel
GraphicsMagick-perl.x86_64                         1.3.33-1.el8                           epel
HepMC.x86_64                                       2.06.10-1.el8                          epel
HepMC-devel.x86_64                                 2.06.10-1.el8                          epel
HepMC-doc.noarch                                   2.06.10-1.el8                          epel
HepMC3.x86_64                                      3.1.2-1.el8                            epel
HepMC3-devel.x86_64                                3.1.2-1.el8                            epel
HepMC3-doc.noarch                                  3.1.2-1.el8                            epel
HepMC3-interfaces-devel.noarch                     3.1.2-1.el8                            epel
HepMC3-rootIO.x86_64                               3.1.2-1.el8                            epel
HepMC3-rootIO-devel.x86_64                         3.1.2-1.el8                            epel
HepMC3-search.x86_64                               3.1.2-1.el8                            epel
HepMC3-search-devel.x86_64                         3.1.2-1.el8                            epel

4) How to Install a Package from the EPEL Repository

To install a package from the EPEL repository, run the yum command as usual, by default it searches the given package in official repositories and if it is not available, then looks to third-party repositories, or use the yum command with the following format.

To test this, we are going to install the “fping” package becuase Centos does not provide this package in their official repositories.

# yum install fping
or
# yum --enablerepo=epel install fping

5) How to Check if the package is Installed from the EPEL Repository

Run the below yum command to see it.

# yum info fping
Last metadata expiration check: 0:04:57 ago on Sat 09 Nov 2019 10:04:29 AM IST.

Installed Packages
Name         : fping
Version      : 4.2
Release      : 2.el8
Arch         : x86_64
Size         : 63 k
Source       : fping-4.2-2.el8.src.rpm
Repo         : @System
From repo    : epel
Summary      : Scriptable, parallelized ping-like utility
URL          : http://www.fping.org/
License      : BSD with advertising
Description  : fping is a ping-like program which can determine the accessibility of
             : multiple hosts using ICMP echo requests. fping is designed for parallelized
             : monitoring of large numbers of systems, and is developed with ease of
             : use in scripting in mind.

Note: You may have seen a lower number of packages in the EPEL 8 repository compared to the EPEL 7 repository because the team has not yet created all the packages, and you may have to wait a while to get it all.

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...