Home » Enable EPEL repo for CentOS
enable-epel-on-centos

Enable EPEL repo for CentOS

by mn.sobieh

EPEL (Extra Packages for Enterprise Linux) is an open-source and free community-based repository. We will explain what it is, then show how to enable EPEL repository for CentOS Linux. starting from earlier available version (currently CentOS 4)

What is EPEL ?

Though, It is a complementary repository, It provides Enterprise-grade packages. The best thing is, EPEL Packages will not conflict with any packages come from distribution channels. Also, packages are suitable for RHEL-based distributions such as Fedora, CentOS, Oracle Linux, and Scientific Linux.

It is not often operating systems gets an upgrade in production environments, So, we will mention older release, like  Versions 4, 5, and 6.

For information about it and communicate with the team maintaining it, you can visit them from here.

There are many situations when we needed it, for example, to mount and access NTFS partition from Linux.

Install EPEL in CentOS older releases

CentOS 4

To Install EPEL on your CentOS, Just run the following command.

su -c 'rpm -Uvh https://download.fedoraproject.org/pub/epel/epel-release-latest-4.noarch.rpm'

CentOS 5

To Install EPEL on your CentOS, Just run the following command.

su -c 'rpm -Uvh https://download.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm'

CentOS 6

For release v 6, you have the option to use RPM or YUM command. Therefore, use one of the following commands.

su -c ‘rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm’

Or, you can use yum.

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

Install EPEL in CentOS 7 and 8

EPEL for CentOS 7

CentOS 7 has an EPEL package stored in the Extra repository. nevertheless, this package causes a few troubles. therefore, I recommend installing the latest packages by following the instructions below.  Firstly, EPEL packages might require packages from option repository. Enable Optional, Extra, and HA repositories.
subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"

Then, You can install it by executing the following command.

su -c 'rpm -Uvh https://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm'

or, from The Extra repository

yum install epel-release

Enable EPEL for CentOS 8

Enable Powetools repository before you start using EPEL because some packages have dependencies from it:

dnf config-manager --set-enabled PowerTools 
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 

To summarize, EPEL repository is a major contribution and has important packages. Installation is easy, nevertheless, it holds a lot fo useful packages. Therefore, I strongly recommend to have it in your operating system.

You may also like

Leave a Comment