Installing EPEL Repository for CentOS 5, 6, 7

The EPEL repository is a separate repository which provides many additional software not provided by the default CentOS repositories. Some third party software might require packages from EPEL so you'll need to install it on your server. The commands below will tell you how to install the EPEL repo for each version of CentOS.

Install

CentOS 7 (64-bit)

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
rpm -ivh epel-release-7-2.noarch.rpm

CentOS 6 (64-bit)
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

CentOS 6 (32-bit)
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

CentOS 5 (64-bit)
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm

CentOS 5 (32-bit)
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm

Verify

Once you've installed one lets verify that it is working. Run the following command to get an output of active repositories on your system.
yum repolist
> Sample Output

Usage


Some packages might be available on more than the EPEL repo, use the following yum command when installing a package to install it from the EPEL repo. We'll use httpd (apache) as an example.
yum --enablerepo=epel install httpd


You're set!