How to enable EPEL repository on CentOS/RHEL?


The EPEL (or Extra Package For Enterprise Linux ) repository provides additional and most commonly used software packages for enterprise Linux and compatible distributions.

The EPEL repo was formed to ensure that the software available for fedora can also be used on enterprise Linux. This repository is supported by the open-source community of developers.

This article will help you in enabling the EPEL repository on enterprise Linux and other compatible distributions.

The EPEL repository can be used on the following distributions –

  • Red Hat Enterprise Linux
  • CentOS
  • Oracle Linux
  • Scientific Linux
  • Amazon Linux (available as Amazon Machine Image or AMI for Amazon EC2), etc.

How to enable EPEL repository on CentOS

You can easily enable the EPEL repository on CentOS by installing epel-release package on it. You can find this package within the CentOS Extras repository –

Now to enable this repository, install the epel-release package by using the given command –

# yum install epel-release -y

If, for whatever reason CentOS Extras repository is missing on your system then the above method will not work. So you need to use the following command to enable the EPEL repository on your system –

On CentOS 7 use –

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

On CentOS 8 use –

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Now you can install a package from the EPEL repository on CentOS.

How to enable EPEL repository on RHEL

For installing in RHEL 8 you also need to enable the CodeReady builder for RHEL 8 because some packages may depend on the packages from it, use –

# ARCH=$( /bin/arch )
# subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

And then use the following command to install and enable the EPEL on RHEL 8 –

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

For enabling EPEL repo on other versions of CentOS and RHEL you could visit the FedoraWiki page.

Now you can install a package from this repository by using the following command –

yum install -y chromium

Conclusion

Ok, that’s all for now if you want to say something on this then write us in the comments below.

Leave a Comment

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