Enable EPEL repository in CentOS & RHEL


EPEL stands for ‘Extra Packages for Enterprise Linux‘ , as the name suggest epel provides additional rpm packages for RHEL , CentOS , Scientific Linux (SL) & Oracle Enterprise Linux (OLE) . EPEL is created and maintained by Fedora community and EPEL packages are 100% free/libre open source software (FLOSS).

In this post we will discuss how to enable epel repository in CentOS / RHEL 5.X / 6.X / 7.X

For CentOS 5.X / RHEL 5.X

Open the terminal & become the root user and execute below command :

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

For CentOS 6.X / RHEL 6.X

Open the terminal execute below command as a root user.

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

For CentOS 7.X / RHEL 7.X

Open the terminal execute below command as a root user

For 64 bit OS

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

Note : EPEL repository file is located under ‘/etc/yum.repos.d/epel.repo’

List New Repository

[root@localhost ~]# yum repolist 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.nbrc.ac.in
 * epel: ftp.jaist.ac.jp
 * extras: mirror.nbrc.ac.in
 * updates: mirror.nbrc.ac.in
repo id            repo name                                                 status
base/7/x86_64      CentOS-7 - Base                                           8,465
epel/x86_64        Extra Packages for Enterprise Linux 7 - x86_64            6,349
extras/7/x86_64    CentOS-7 - Extras                                         75
updates/7/x86_64   CentOS-7 - Updates                                        1,127
repolist: 16,016

List EPEL Packages :

[root@localhost ~]# yum --disablerepo="*" --enablerepo="epel" list available

Sample Output

list-epel-packages

Getting Package info

[root@localhost ~]# yum --enablerepo=epel info htop
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.nbrc.ac.in
 * epel: ftp.jaist.ac.jp
 * extras: mirror.nbrc.ac.in
 * updates: mirror.nbrc.ac.in
Available Packages
Name        : htop
Arch        : x86_64
Version     : 1.0.3
Release     : 3.el7
Size        : 87 k
Repo        : epel/x86_64
Summary     : Interactive process viewer
URL         : http://hisham.hm/htop/
License       : GPL+
Description : htop is an interactive text-mode process viewer for Linux, similar to
            : top(1).

Installing package from epel repo.

[root@localhost ~]# yum --enablerepo=epel install htop

2 Responses

  1. Jay Dwivedi says:

    These all urls doesn’t work anymore please update ur portal with proper urls.

Leave a Reply

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