Linux Administrator

How to Install EPEL Repository on CentOS and RHEL

install-epel-repository
mm
Written by Santosh Prasad

Using EPEL repository you can install easily various packages on your system by configuring EPEL repository but this packages are not officially recommended by either CentOS or Red Hat but it provides lots of popular packages and apps.

In this article I will show you how you can install and enable EPEL repository on your Linux system.

Install EPEL repository on CentOS and RHEL

Follow the below steps to install EPEL repository on your system:

1. Login into your server using SSH.
2. Install EPEL repository using below command.
3. Refresh and list repo using below command.

On CentOS or RHEL 7.x

# yum install epel-release

You will get some output like below:

Loaded plugins: fastestmirror, priorities, protectbase, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
 * webtatic: us-east.repo.webtatic.com
8 packages excluded due to repository priority protections
1 packages excluded due to repository protections
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================
 Package                                 Arch                              Version                           Repository                         Size
=====================================================================================================================================================
Installing:
 epel-release                            noarch                            6-8                               extras                             14 k

Transaction Summary
=====================================================================================================================================================
Install       1 Package(s)

Total download size: 14 k
Installed size: 22 k
Is this ok [y/N]:

Alternate Method

If above command fail then you can follow the below method to install EPEL repository.

On CentOS or RHEL 7.x

# cd /tmp
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# ls *.rpm

Then run the below command to install epel-release-7.x.noarch.rpm.

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

Repository Listing

After installing repository on system you can see the installed repository using below command:

# yum repolist

You will get some output like below:

Loaded plugins: fastestmirror, priorities, protectbase, replace
Loading mirror speeds from cached hostfile
 * epel: fedora-epel.mirror.lstn.net
 * webtatic: us-east.repo.webtatic.com
114 packages excluded due to repository priority protections
1 packages excluded due to repository protections
repo id                                            repo name                                                                               status
ajenti                                             Ajenti                                                                                       177+2
base                                               CentOS-6 - Base                                                                           6,667+39
blackfire                                          blackfire                                                                                        4
epel                                               Extra Packages for Enterprise Linux 6 - x86_64                                          11,644+802
extras                                             CentOS-6 - Extras                                                                             45+1
updates                                            CentOS-6 - Updates                                                                          741+15
vz-base                                            vz-base                                                                                          3
vz-updates                                         vz-updates                                                                                     2+6
webtatic                                           Webtatic Repository EL6 - x86_64                                                            28+422
repolist: 19,311

Now repository is enabled and installed, run the below command to install package.

# yum --disablerepo="*" --enablerepo="epel" install package-name
Thank you! for visiting Look Linux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment