How to Enable EPEL Repository on CentOS 7 / RHEL 7

Share this Article :

Epel repository is an open source package for developers and system administrators to perform the installation of RPM packages via yum on their virtual private server (VPS). EPEL repository is in addition to the existing repository and it provides 100 % high quality software packages for Linux distributions, including RHEL (Red Hat Enterprise Linux), CentOS and Debian, and all packages maintained by Fedora repo team.

1. Prepare EPEL repository for RHEL 7/CentOS 7 64 bit :

# sudo rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
# sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Example :

# sudo rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
# sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-5                 ################################# [100%]

In CentOS 7, an alternative way to install the EPEL repo is by using the command yum :

# sudo yum install epel-release -y

2. Command to verify that the EPEL repository is enabled.

# sudo yum repolist

Sample output :

Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id                              repo name                                                status
..
..
epel/x86_64                          Extra Packages for Enterprise Linux 7 - x86_64           7,330
..

3. Install httpd package using epel repo option –enablerepo=epel :

# sudo yum --enablerepo=epel install httpd

centos_how_to_enable_epel

Leave a Reply