How to Install and Enable EPEL Repository on CentOS 8/7/6

In this article, you will learn how to install and enable EPEL repository on CentOS 8.x, CentOS 7.x and CentOS 6.x releases to install additional standard open-source software packages by using YUM and DNF package manager.

What is EPEL

EPEL (Extra Packages for Enterprise Linux) is an open-source and free community-based repository project from Fedora team which provides 100% high-quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux.

EPEL project is not a part of RHEL/CentOS but it is designed for major Linux distributions by providing lots of open source packages like networking tools, sysadmin tools, programming, monitoring and so on. Most of the EPEL packages are maintained by Fedora repo.

Why we Use the EPEL Repository?

  1. Provides lots of open source packages to install via Yum and DNF.
  2. Epel repo is 100% open source and free to use.
  3. It does not provide any core duplicate packages and no compatibility issues.
  4. All EPEL packages are maintained by Fedora repo.

How to Install EPEL Repository on CentOS Server

To install EPEL repository on any CentOS releases, log in to your CentOS server instance as root user and run the commands as explained below as per your release version.

How to Install EPEL Repo on CentOS 8.x

# yum search epel-release
# yum info epel-release
# yum install epel-release
Install EPEL Repo on CentOS 8

Install EPEL Repo on CentOS 8

How to Install EPEL Repo on CentOS 7.x

# yum search epel-release
# yum info epel-release
# yum install epel-release
Install EPEL Repo on CentOS 7.x

Install EPEL Repo on CentOS 7.x

How to Install EPEL Repo on CentOS 6.x

# yum search epel-release
# yum info epel-release
# yum install epel-release
Install EPEL Repo on CentOS 6.x

Install EPEL Repo on CentOS 6.x

How Do I Verify EPEL Repo?

Now update the software packages and verify the installation of the EPEL repository using the following commands.

# yum update
# rpm -qa | grep epel
Verify Epel Repo Installation

Verify Epel Repo Installation

You can also verify that the EPEL repository is enabled on the system by listing all active repositories using the following command.

# yum repolist
List Yum Repositories

List Yum Repositories

To list the software packages that constitute the EPEL repository, run the command.

# dnf --disablerepo="*" --enablerepo="epel" list available
OR
# yum --disablerepo="*" --enablerepo="epel" list available
List Packages Available from Epel Repo

List Packages Available from Epel Repo

Alternatively, you can use the following grep command to search for individual package names as shown.

# yum --disablerepo="*" --enablerepo="epel" list available | grep 'htop'
OR
# dnf --disablerepo="*" --enablerepo="epel" list available | grep 'monitorix'
Search Packages in EPEL Repo

Search Packages in EPEL Repo

How Do I Use EPEL Repo to Install Packages?

Once the EPEL repository has been successfully installed, a package can be installed using the command.

# dnf --enablerepo="epel" install <package_name>
OR
# yum --enablerepo="epel" install <package_name>

For example, to search and install a package called htop – an interactive Linux process-viewer, run the following command.

# yum --enablerepo=epel info htop
Find Package Info

Find Package Info

Now, to install Htop package, the command will be.

# yum --enablerepo=epel install htop
Install Package from Epel Repo

Install Package from Epel Repo

Note: The EPEL configuration file is located under /etc/yum.repos.d/epel.repo.

Conclusion

In this article, you learned how to install the EPEL repository on CentOS 8.x, CentOS 7.x, and CentOS 6.x releases. We welcome you to try it out and share your feedback in the comment section below.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

201 Responses

  1. Sondra says:

    I need help, please. I have attempted the install of the epel repo, it says it’s already there, but whenever I do a yum update, I get a bunch of these

    http://mirror.grid.uchicago.edu/pub/linux/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTP Error 404 - Not Found
    https://mirror.umd.edu/fedora/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    https://mirrors.sonic.net/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    https://muug.ca/mirror/fedora-epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    https://ord.mirror.rackspace.com/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    http://mirror.nodesdirect.com/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTP Error 404 - Not Found
    https://mirror.steadfastnet.com/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    http://mirror.rnet.missouri.edu/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTP Error 404 - Not Found
    http://fedora-epel.mirror.lstn.net/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTP Error 404 - Not Found
    https://d2lzkl7pfhq30w.cloudfront.net/pub/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    http://mirror.oss.ou.edu/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTP Error 404 - Not Found
    https://dfw.mirror.rackspace.com/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    https://mirror.dal.nexril.net/fedora-epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found
    https://pubmirror2.math.uh.edu/fedora-buffet/epel/7/x86_64/repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found

    I don’t actually see the files when I navigate to those locations separately. Can you help, please?

    Thank you!
    Sondra

    • Ravi Saive says:

      @Sondra,

      The following commands will fix this issue..

      # yum clean all
      # yum makecache
      # yum update
      

      If you still see errors, make sure to have repo_gpgcheck is set to 0 in yum.conf file for CentOS.

      • Sondra says:

        Thank you! Turning off the repo gpg check worked. In regards to the security posture of epel, do you think they’ll fix it upstream, soon? Or do I need to get in on the Wednesday meeting to report that I think there’s a change that needs to be made?

  2. chinda says:

    Please, I keel seeing this error after enabling EPEL repository so I can be able to install “terminator”. How can I fix this?

    Preparing...                ########################################### [100%]
            package epel-release-6-8.noarch is already installed
    
    [[email protected] ~]# yum repolist
    Loaded plugins: product-id, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
    
  3. madhav khating says:

    Very good article, but don’t you miss one step of editing epel.repo file. By default, the baseline has # at beginning need to uncomment it in order to work repository.

  4. agung says:
    # yum -y install openvpn easy-rsa net-tools bridge-utils
    

    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * epel: del-repos.extreme-ix.org
    Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
    Package bridge-utils-1.5-9.el7.x86_64 already installed and latest version
    Resolving Dependencies
    –> Running transaction check
    —> Package easy-rsa.noarch 0:3.0.3-1.el7 will be installed
    —> Package openvpn.x86_64 0:2.4.6-1.el7 will be installed
    –> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: openvpn-2.4.6-1.el7.x86_64
    –> Processing Dependency: libpkcs11-helper.so.1()(64bit) for package: openvpn-2.4.6-1.el7.x86_64
    –> Processing Dependency: liblz4.so.1()(64bit) for package: openvpn-2.4.6-1.el7.x86_64
    –> Running transaction check
    —> Package lz4.x86_64 0:1.7.3-1.el7 will be installed
    —> Package openvpn.x86_64 0:2.4.6-1.el7 will be installed
    –> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: openvpn-2.4.6-1.el7.x86_64
    —> Package pkcs11-helper.x86_64 0:1.11-3.el7 will be installed
    –> Finished Dependency Resolution
    Error: Package: openvpn-2.4.6-1.el7.x86_64 (epel)
    Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest
    [[email protected] ~]#

  5. Anis Zaidi says:

    Please resolve my Issue.

    [[email protected] ~]# yum install cacti
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base: repo.inara.pk
    * epel: sg.fedora.ipserverone.com
    * extras: repo.inara.pk
    * updates: repo.inara.pk
    Resolving Dependencies
    –> Running transaction check
    —> Package cacti.noarch 0:1.1.19-2.el6 will be installed
    –> Processing Dependency: php-imap for package: cacti-1.1.19-2.el6.noarch
    –> Finished Dependency Resolution
    Error: Package: cacti-1.1.19-2.el6.noarch (epel)
    Requires: php-imap
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    • Ravi Saive says:

      @Anis,

      Try these following installation instructions to install Cacti on CentOS 6.

      Download latest epel-release rpm from

      # wget https://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
      

      Install epel-release rpm:

      # rpm -Uvh epel-release*rpm
      

      Install cacti rpm package:

      # yum install cacti
      
  6. Sumit Khera says:

    Sir, Please solve my problem.

    I am using RHEL7 inside the VMVare. I am getting the same error while enabling the EPEL repository.

    I have installed “epel-release-7-11.noarch”, Now i am updating my repository but i am not able to do it.

    I can’t use internet inside the VMVare.

    When i run command for enabling epel repository “yum update curl nss nss-util nspr” still it not able show repo of epel.

    When i run this command “yum-config-manager –enable epel” still after run that when i run yum repolist, still it not showing me desired result.

    Please solve my problem. So that i can use NRPE on my client machine.

    It would be helpful to me.

  7. Kumar says:

    Nice article, If we do not have internet on the server. How can we install and configure *epel*? Suppose my desktop is windows and I’ll connect to the server through putty and my servers are in private network. Is there any possible way that we can download all epel rpms and do some kind of local repo config?

  8. Manikandan says:
    # git clone https://github.com/ansible/ansible.git --recursive
    Cloning into 'ansible'...
    

    fatal: unable to access ‘https://github.com/ansible/ansible.git/’: Peer reports incompatible or unsupported protocol version.

    while get the repo from latest source we are getting the above error in redhat7.

    • Ravi Saive says:

      @Manikandan,

      Some old NSS is used for SSL within cURL library when you download any package from the web, so it’s rejected. In such case, updating curl combined with nss update will help you..

      # yum update curl nss nss-util nspr
      

      Hope this helps!

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

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