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.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

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

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

205 thoughts on “How to Install and Enable EPEL Repository on CentOS 8/7/6”

  1. Hi! All

    I am trying to Enable EPEL Repository in (_64 x86_64 x86_64 GNU/Linux)

    I am getting below erros please help me

    ThankQ

    # RHEL/CentOS 6 64-Bit ##

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

    # rpm -ivh epel-release-6-8.noarch.rpm

    [[email protected] Talla ~]# yum repolist

    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

    [[email protected] Talla ~]#

    [[email protected] Talla ~]# yum –enablerepo=epel info zabbix

    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

    [[email protected] Talla ~]# yum –enablerepo=epel install zabbix

    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

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

    Reply
    • First clear Yum cache as shown.

      # yum clean all && yum makecache
      

      You may come across such error, after installing epel-release. The quick fix is to update your SSL certificates:

      # yum -y upgrade ca-certificates
      
      Reply
  2. I am having one doubt, in my interview interviewer asked that you configured yum server and you are having 3700 Packages in your local machine now you need to add extra 200 packages how?

    Please need help..

    Reply
    • @Rene,

      I totally agree both CentOS 4 and CentOS 5 are dead, even epel repository don’t have any packages for it, all links are dead. And also I have updated the article by removing CentOS 5 and 4 links.

      Reply
  3. unable install openstack in rhel 7…
    got error while installing ( #yum install openstack-packstack) :
    Error: Package: 1:openstack-packstack-10.0.1-1.el7.noarch (openstack-ocata)
    Requires: python-docutils
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    Kindly help …!!!!

    Reply
  4. Hi,

    I got an error after issuing this command: yum –enablerepo=epel install phpmyadmin
    Could you help me please?

    Error: Package: php-tcpdf-6.2.13-1.el6.noarch (epel)
    Requires: php-posix
    Error: Package: php-tcpdf-6.2.13-1.el6.noarch (epel)
    Requires: php-bcmath
    Error: Package: php-tcpdf-6.2.13-1.el6.noarch (epel)
    Requires: php-tidy
    Error: Package: phpMyAdmin-4.0.10.19-1.el6.noarch (epel)
    Requires: php-mbstring
    Error: Package: php-php-gettext-1.0.12-1.el6.noarch (epel)
    Requires: php-mbstring
    Error: Package: php-tcpdf-6.2.13-1.el6.noarch (epel)
    Requires: php-mbstring
    You could try using –skip-broken to work around the problem
    ** Found 1 pre-existing rpmdb problem(s), ‘yum check’ output follows:
    SECU_PROD-2-1.i386 has missing requires of /usr/bin/sh

    Reply
  5. Sir, I found error.

    This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
    No package zabbix available.
    Error: Nothing to do

    what I do? please help me.

    Reply
  6. Nice, i was trying for packages for RHEL 7, it worked well for me.
    Thank you Ravi Saive. Also thanks to other for queries it helps others too.

    Reply

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

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