Enabling the EPEL Repository on CentOS 7

Enabling the EPEL repository on CentOS 7 is a pretty simple task as the EPEL rpm package is included in the CentOS extras repository.

To install the EPEL release package, type the following command:

sudo yum install epel-release

To verify that the EPEL repository is enabled run the yum repolist command that will list all available repositories.

sudo yum repolist

The command will display the repo ID, name and the number of packages for the enabled repositories. The output should include a line for the EPEL repository.

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
...
repo id             repo name                                         status
base/7/x86_64       CentOS-7 - Base                                   10,019
epel/x86_64         Extra Packages for Enterprise Linux 7 - x86_64    12,912
extras/7/x86_64     CentOS-7 - Extras                                    371
updates/7/x86_64    CentOS-7 - Updates                                 1,098
repolist: 24,400

That’s it. EPEL repository has been enabled on your CentOS system.

Enabling the EPEL Repository on RHEL

This method will work on any RHEL based distribution including Red Hat, CentOS 6 and 7, Oracle Linux, Amazon Linux, and Scientific Linux.

To enable the EPEL repository, run the following command which will download and install the EPEL release package:

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm
  • No labels