Enable EPEL Repository (RHEL/CentOS 7.x/6.x/5.x)


To totally unlock this section you need to Log-in


Login

EPEL (Extra Packages for Enterprise Linux) is 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.

The 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, sys admin, programming, monitoring and so on. Most of the EPEL packages are maintained by Fedora repo.

The EPEL group creates, maintains and manages a high quality set of additional packages. These packages may be software not included in the core repository, or sometimes updates which haven’t been provided yet.

Why we use EPEL repository?

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

How To Enable EPEL Repository in RHEL/CentOS 7/6/5?

Enabling the EPEL repo will differ slightly depending on which OS you are enabling it from. Overall the installation process for EPEL should be pretty straight forward, there are some distros that make it even easier though.

First, you need to download the file using Wget and then install it using RPM on your system to enable the EPEL repository. Use below links based on your Linux OS versions. (Make sure you must be root user).

Installing EPEL on CentOS via yum

By far CentOS is the easiest distro to install EPEL on. The CentOS distribution includes a repo called ‘CentOS Extras’ by default. Within this repo users can find a EPEL package, so in this case enabling EPEL is as easy as installing any other package.

  1. Connect to the server via SSH as the root user; or open a terminal if you’re working locally.
  2. Install the EPEL repository with the following command: sudo yum install epel-release.
  3. Confirm your work and refresh the repo list by running: sudo yum repolist.
  4. Essentially once you’re logged in as the root user, just run the following command:
sudo yum install epel-release

Enable EPEL Repository (RHEL/CentOS 7.x/6.x/5.x)

RHEL/CentOS 7 64 Bit

## RHEL/CentOS 7 64-Bit ##
# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm

RHEL/CentOS 6 32-64 Bit

## RHEL/CentOS 6 32-Bit ##
# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

## 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

The following is another way to install the rpm file just downloaded with wget: once you’ve downloaded the EPEL rpm file for your OS version, you can now install the EPEL repository. To install the EPEL rpm run:

yum install ./epel-release-latest-*.noarch.rpm

How Do I Verify EPEL Repo?

You need to run the following command to verify that the EPEL repository is enabled. Once you ran the command you will see EPEL repository.

# yum repolist
Sample Output
Loaded plugins: downloadonly, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: centos.aol.in
 * epel: ftp.cuhk.edu.hk
 * extras: centos.aol.in
 * rpmforge: be.mirror.eurid.eu
 * updates: centos.aol.in
Reducing CentOS-5 Testing to included packages only
Finished
1469 packages excluded due to repository priority protections
repo id                           repo name                                                      status
base                              CentOS-5 - Base                                               2,718+7
epel Extra Packages for Enterprise Linux 5 - i386 4,320+1,408
extras                            CentOS-5 - Extras                                              229+53
rpmforge                          Red Hat Enterprise 5 - RPMforge.net - dag                      11,251
repolist: 19,075

To filter the output and get only the EPEL rows (if any), just follow this method: to ensure that the EPEL repository is installed, search for it in the list of yum repositories and use grep command to filter out what you don't want to see leaving only those which have "epel" string in it:

# yum repolist | grep "^epel\|repo id"
Sample output:

repo id repo name status epel Extra Packages for Enterprise Linux 6 - x86_64 8,447

How Do I Use EPEL Repo?

You need to use YUM command for searching and installing packages. For example we search for Zabbix package using epel repo, lets see it is available or not under epel.

# yum --enablerepo=epel info zabbix
Sample Output
Available Packages
Name       : zabbix
Arch       : i386
Version    : 1.4.7
Release    : 1.el5
Size       : 1.7 M
Repo : epel
Summary    : Open-source monitoring solution for your IT infrastructure
URL        : http://www.zabbix.com/
License    : GPL
Description: ZABBIX is software that monitors numerous parameters of a network.
Let’s install Zabbix package using epel repo option –enablerepo=epel switch.

# yum --enablerepo=epel install zabbix

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

This way you can install as many as high standard open source packages using EPEL repo.

Disabling EPEL repo

By editing the repository configuration file /etc/yum.repos.d/epel.repo and setting enabled=0 in the [epel] section, EPEL repository can be disabled.

To install a package from a disabled repository, use –enablerepo=repo_id option with yum command. For example, if EPEL repo is disabled, the nload package can be installed from it using following command:

yum install --enablerepo=epel nload