How To Install EPEL Repo on CentOS/RHEL


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. This quick tutorial explains how to configure a CentOS or Red Hat Enterprise Linux (RHEL) version 7.x to use the Fedora Extra Packages for Enterprise Linux (EPEL) repository.

Commands to install EPEL repo on a CentOS Linux and RHEL 7.x

The procedure to enable EPEL repository for a CentOS/RHEL 7.x server is as follows:

  1. Open a shell prompt.
  2. Or login to a host called server1 using ssh client.
  3. Install epel using the following command: yum -y install epel-release
  4. Refresh repo by typing the following command: yum repolist

How to install EPEL repo on a CentOS and RHEL 7.x

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

Method #1: Install Extra Packages for Enterprise Linux repository configuration (recommended)

Just type the following yum command on a CentOS 7 or RHEL 7:

sudo yum install epel-release

Note: If method #1 failed, try the following method #2 to install EPEL Repo.

Method #2: Install the extra EPEL repositories from

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

cd /tmp

Sample outputs:

--2018-06-09 11:44:46--
Resolving (,,
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15080 (15K) [application/x-rpm]
Saving to: 'epel-release-latest-7.noarch.rpm'

100%[=======================================================================================================================================>] 15,080      77.9KB/s   in 0.2s   

2018-06-09 11:44:47 (77.9 KB/s) - 'epel-release-latest-7.noarch.rpm' saved [15080/15080]
ls *.rpm

Sample outputs:


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

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

Sample outputs:

Loaded plugins: fastestmirror
Examining epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
Marking epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                  Arch                               Version                             Repository                                                 Size
 epel-release                             noarch                             7-11                                /epel-release-latest-7.noarch                              24 k

Transaction Summary
Install  1 Package

Total size: 24 k
Installed size: 24 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-11.noarch                                                                                                                                      1/1 
  Verifying  : epel-release-7-11.noarch                                                                                                                                      1/1 

  epel-release.noarch 0:7-11                                                                                                                                                     


List your new repos

Once installed you should see epel repo using the following yum repolist command

$ sudo yum repolist

Sample outputs:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
repo id                                                               repo name                                                                                            status
base/7/x86_64                                                         CentOS-7 - Base                                                                                       9911
epel/x86_64                                                           Extra Packages for Enterprise Linux 7 - x86_64                                                       12581
extras/7/x86_64                                                       CentOS-7 - Extras                                                                                      305
updates/7/x86_64                                                      CentOS-7 - Updates                                                                                     654
repolist: 23451

Search and install package

To list all available packages under a repo called epel, enter:

$ sudo yum --disablerepo="*" --enablerepo="epel" list available


$ sudo yum --disablerepo="*" --enablerepo="epel" list available | grep 'package'


$ sudo yum --disablerepo="*" --enablerepo="epel" list available | less

Sample outputs:

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.