EPEL repository is part of special groups within the fedora group, it creates & maintains additional packages for Enterprise Linux, mainly CentOS, RHEL, Scientific Linux, Oracle Linux. EPEL stands for Extra Packages for Enterprise Linux & provides packages that are not available with the default repositories.

Recommended Read: Examples on how to use YUM command in Linux

Also Read: Scheduling CRON Jobs with Crontab for Beginners

There are two methods using which we can install the EPEL repository on the Linux system,

1- Using the packages from default repositories

2- Using rpm package

1- Using the packages from the default repositories

To install the package from default repositories, use the following command,

CentOS/RHEL 6/7

# yum install epel-release


# dnf install epel-release

This command will work most of the times but I have faced an issue with some versions where this might not work. So if this does not work for you, then you can use the second method.

2- Using RPM packages

For this method, we will directly install the RPM package for epel repository. Based on the version, use one of the following commands,

RHEL/CentOS 6:

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

RHEL/CentOS 7:

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

Epel also recommends for RHEL 7, to enable the optional, extras, and HA repositories since EPEL packages may depend on packages from these repositories, using the following command,

# subscription-manager repos –enable “rhel-*-optional-rpms” –enable “rhel-*-extras-rpms” –enable “rhel-ha-for-rhel-*-server-rpms”

RHEL/CentOS 8:

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

Note:- EPEL also recommends for RHEL 8, to enable the code ready-builder-for-rhel-8-*-rpms repository since EPEL packages may depend on packages from it. To install it, use the following commands,

# ARCH=$( /bin/arch )

# subscription-manager repos –enable “codeready-builder-for-rhel-8-${ARCH}-rpms”

Note:- For CentOS 8, EPEL recommends to also enable the PowerTools repository since EPEL packages may depend on packages from it, run the following command to enable power tools,

# dnf config-manager –set-enabled PowerTools

Check repository

Once the EPEL repository has been installed, we can check it by executing the following command,

RHEL/CentOS 6/7

# yum repolist


# dnf repolist epel

We can now install the packages available in the EPEL repository. Please share this tutorial, or if you have any questions, concerns or suggestions, please send them to us using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.