Install EPEL Repo on a CentOS and RHEL 7.x

by on June 23, 2014 · 5 comments· LAST UPDATED September 2, 2014

in , ,

How do I install the extra repositories such as Fedora EPEL repo on a Red Hat Enterprise Linux server version 7.x or CentOS Linux server version 7.x?

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
RequirementsCentOS/RHEL/Fedora
Estimated completion time5m
You can easily install various packages by configuring a CentOS 7.x or RHEL 7.x system to use Fedora EPEL repos and third party packages. Please note that these packages are not officially supported by either CentOS or Red Hat, but provides many popular packages and apps.

How to install RHEL EPEL repository on Centos 7.x or RHEL 7.x

The following instuctions assumes that you are running command as root user on a CentOS/RHEL 7.x system and want to use use Fedora Epel repos.

Install the extra EPEL repositories

The command is as follows to download epel release for CentOS and RHEL 7.x using wget command:

 
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm
ls *.rpm
 

To install epel-release-7-1.noarch.rpm, type:

 
sudo yum install epel-release-7-1.noarch.rpm
 

Sample outputs:

Loaded plugins: amazon-id, rhui-lb
Examining epel-release-7-1.noarch.rpm: epel-release-7-1.noarch
Marking epel-release-7-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-1 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package            Arch         Version   Repository                      Size
================================================================================
Installing:
 epel-release       noarch       7-1       /epel-release-7-1.noarch        22 k
 
Transaction Summary
================================================================================
Install  1 Package
 
Total size: 22 k
Installed size: 22 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-1.noarch                                      1/1
  Verifying  : epel-release-7-1.noarch                                      1/1
 
Installed:
  epel-release.noarch 0:7-1
 
Complete!
 

List your new repos

Once installed you should see epel repo using the following yum repolist command
$ sudo yum repolist
Sample outputs:

Loaded plugins: amazon-id, rhui-lb
repo id                                         repo name                                         status
epel/x86_64                                     Extra Packages for Enterprise Linux 7 - x86_64    5,610
rhui-REGION-client-config-server-7/x86_64       Red Hat Update Infrastructure 2.0 Client Configur     2
rhui-REGION-rhel-server-releases/7Server/x86_64 Red Hat Enterprise Linux Server 7 (RPMs)          4,718
repolist: 10,330

Search and install package

To list all available packages under a repo called epel, enter:
$ sudo yum --disablerepo="*" --enablerepo="epel" list available
OR
$ sudo yum --disablerepo="*" --enablerepo="epel" list available | grep 'package'
OR
$ sudo yum --disablerepo="*" --enablerepo="epel" list available | less
Sample outputs:

Fig. 01: List all available packages under a EPEL Repo on a CentOS/RHEL/Fedora Linux

Fig. 01: List all available packages under a EPEL Repo on a CentOS/RHEL/Fedora Linux

Example: Search and install htop package from epel repo on a CentOS/RHEL 7.x

The commands are as follows:

## search it ##
sudo yum search htop
 
## get more info, if found ##
sudo yum info htop
 
## install it ##
sudo yum install htop
 

And, there you have it, a larger number of packages to install from EPEL repo on a CentOS and Red Hat Enterprise Linux (RHEL) version 7.x.

See also
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 5 comments… read them below or add one }

1 bminish June 24, 2014 at 10:12 am

yum can install directly from a url.

$ sudo yum install http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm 

saves a few steps

Reply

2 sugatang itlog July 5, 2014 at 10:17 am

Or better ….

rpm -i http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm

in linux you can do the same using different methods!

More power nixCraft!

Reply

3 Alan Miller August 28, 2014 at 2:31 am

One problem I ran into after this was needing to clean metadata using ‘sudo yum clean metadata’ – until I did that, I was getting an error of “repomd.xml does not match metalink for epel”

Reply

4 Michael Kremser September 2, 2014 at 5:56 am

EPEL 7 has left beta yesterday, September, 1st, 2014. You can now use the URI http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm to download the EPEL RPM package.

Reply

5 Nix Craft September 2, 2014 at 10:36 am

Thanks for the head up!

Reply

Leave a Comment

Tagged as: , ,

Previous Faq:

Next Faq: