Have a Question?

If you have any question you can ask below or enter what you are looking for!

How to enable EPEL repo on CentOS

Introduction

The Extra Packages for Enterprise Linux (or EPEL) YUM repository contains high quality additional packages for Red Hat Enterprise Linux (RHEL), CentOS Scientific Linux (SL) and Oracle Linux (OL). It is maintained by the Fedora Special Interest Group for EPEL. This article decribes enabling EPEL repo on CentOS 5/6/7.

Requirements

Root user privilege is required in the server to run the commands decribed here.

Enabling EPEL repo

EPEL repo has an ‘epel-release’ package that includes gpg keys for package signing and repository information. Use following RPM command to install this package to enable EPEL repo in your server.

for CentOS 5,

rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

for CentOS 6,

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

for CentOS 7,

rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

To verify that EPEL repo is enable, run yum repolist command as given below. It should list EPEL repo.

[root@server ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.umd.edu
 * epel: mirror.redsox.cc
 * extras: ftp.usf.edu
 * updates: mirrors.adams.net
repo id			repo name					status
base			CentOS-6 - Base					6,518
epel			Extra Packages for Enterprise Linux 6 - x86_64	11,381
extras			CentOS-6 - Extras				37
updates			CentOS-6 - Updates				1,044
repolist: 18,980

As you can see from above list, EPEL repo for CentOS 6 contains 11,381 packages at this time of writing.

The epel-release RPM installs two repository configuration files, /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo. The high quality stable packages are available from epel repo and it is enabled by default. The epel-testing repo is disabled by default and it contains packages that are not yet considered to be stable by the standards set by Fedora Special Interest Group for EPEL.

Installing packages from EPEL repo

To install packages from EPEL repo, you can use yum install package_name command. For example, package for nload which is a real time bandwidth usage monitoring tool is available from EPEL repo and can be installed using following command:

yum install nload

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

More information on EPEL project is available on https://fedoraproject.org/wiki/EPEL.

Leave a Reply

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

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>