CentOS / RHEL / Scientific Linux 6 Enable & Install EPEL Repo

by on January 24, 2012 · 11 comments· LAST UPDATED February 24, 2013

in ,

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL),CentOS and Scientific Linux (SL). How do I enable it under CentOS 6 or RHLE 6 server?

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
RequirementsCentOS/RHEL
Estimated completion timeN/A

You need to install the following rpms as per your Enterprise Linux version. Use the wget command to download rpm files.
Fig.01: HowTo: Enable EPEL Repository on CentOS/RHEL/SL/Fedora Linux

Fig.01: HowTo: Enable EPEL Repository on CentOS/RHEL/SL/Fedora Linux

If you are running an CentOS6/EL6 version, enter:

$ cd /tmp
$ wget http://mirror-fpt-telecom.fpt.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

If you are running an CentOS5/EL5 version, enter:

$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

If you are running an CentOS4/EL4 version, enter:

The following may not be supported:
$ cd /tmp
$ wget http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

Install epel*.rpm file using yum command

You can use the yum command instead of rpm command:
# yum install epel-release-6-8.noarch.rpm
Sample outputs:

 
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Examining epel-release-6-8.noarch.rpm: epel-release-6-8.noarch
Marking epel-release-6-8.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package            Arch         Version   Repository                      Size
================================================================================
Installing:
 epel-release       noarch       6-8       /epel-release-6-8.noarch        22 k
 
Transaction Summary
================================================================================
Install       1 Package(s)
 
Total size: 22 k
Installed size: 22 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : epel-release-6-8.noarch                                      1/1
  Verifying  : epel-release-6-8.noarch                                      1/1
 
Installed:
  epel-release.noarch 0:6-8
 
Complete!
 
 

How do I list all enabled repos?

Type the following commands:
# yum repolist
OR
# yum -v repolist | less
Sample outputs:

Fig.01: Yum Query All Repositories and Show Repository ID's Command

Fig.01: Yum Query All Repositories and Show Repository ID's Command


Please note that epel is your "EPEL Repo ID" in the above output.

How do I list all packages in EPEL repo?

Type the following command to list all packages from EPEL repo only:
# yum --disablerepo="*" --enablerepo="epel" list available
To search packages in epel repo only, enter:
# yum --disablerepo="*" --enablerepo="epel" search packageNameHere
# yum --disablerepo="*" --enablerepo="epel" search nginx

How do I use EPEL repo?

Simply use the yum commands to search or install packages from EPEL repo:
# yum search nginx
# yum update
# yum --disablerepo="*" --enablerepo="epel" install nginx

Sample outputs:

Loaded plugins: product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
epel/metalink                                                                                                                          |  13 kB     00:00
epel                                                                                                                                   | 4.3 kB     00:00
epel/primary_db                                                                                                                        | 4.1 MB     00:03
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.0.10-1 will be updated
---> Package dkms.noarch 0:2.1.0.1-1.el6 will be an update
---> Package iftop.x86_64 0:0.17-1.el6 will be updated
---> Package iftop.x86_64 0:1.0-0.1.pre2.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================
 Package                            Arch                                Version                                       Repository                         Size
==============================================================================================================================================================
Updating:
 dkms                               noarch                              2.1.0.1-1.el6                                 epel                               99 k
 iftop                              x86_64                              1.0-0.1.pre2.el6                              epel                               44 k
Transaction Summary
==============================================================================================================================================================
Upgrade       2 Package(s)
Total download size: 144 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): dkms-2.1.0.1-1.el6.noarch.rpm                                                                                                   |  99 kB     00:00
(2/2): iftop-1.0-0.1.pre2.el6.x86_64.rpm                                                                                               |  44 kB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                         543 kB/s | 144 kB     00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) 
 Package: epel-release-6-5.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : dkms-2.1.0.1-1.el6.noarch                                                                                                                  1/4
  Updating   : iftop-1.0-0.1.pre2.el6.x86_64                                                                                                              2/4
  Cleanup    : dkms-2.0.10-1.noarch                                                                                                                       3/4
  Cleanup    : iftop-0.17-1.el6.x86_64                                                                                                                    4/4
Installed products updated.
Updated:
  dkms.noarch 0:2.1.0.1-1.el6                                                 iftop.x86_64 0:1.0-0.1.pre2.el6
Complete!

Check out related media

This tutorial is also avilable in a quick video format that explains how to install EPEL repository on CentOS or RHEL 6.x server so that you can install additional packages directly using the yum command only.



(Video 01: Enable EPEL Repository On CentOS / Red Hat Linux For Yum Package)

See also

For more information see how to use "yum command to Update / Install Packages Under Red Hat Enterprise / CentOS Linux Version v5.x/v6.x and above" for more information.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 11 comments… read them below or add one }

1 Me June 3, 2012 at 10:44 am
2 AJ June 11, 2012 at 7:09 pm

The new link is:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

The other gives 404 errors.

Reply

3 kamal June 12, 2012 at 5:01 am

Nice tips… I have updated my EPEL Repo!!
Thanks

Reply

4 Aaron June 30, 2012 at 9:19 am

Thanks for this tip and AJ’s new link. I was finally able to install Twinkle SIP softphone with help of this blog post.

Reply

5 AJ July 2, 2012 at 1:15 pm

I have to say this is the BEST site for RHEL/CentOS, I found the updated EPEL repo info from going to the site.
Glad to help out.
:)

Reply

6 Kristian September 27, 2012 at 3:40 pm

For those who are wondering why the RPM links in the article won’t work, just go to
http://download.fedoraproject.org/pub/epel/6/i386/

and find the current epel-release-*.noarch.rpm.

Reply

7 michael January 8, 2013 at 6:57 am

For all why centos 6 links are not working they have update 6.8/
Below the commands:

rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

or:
cd /tmp
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

Reply

8 Majid January 14, 2013 at 1:17 pm

Thank you

Reply

9 Renol Pad December 1, 2013 at 12:07 pm

Client 0000000e0017fc01
Red Hat Global Desktop 000000990007fc02
Server 000000e90007fc00
Server with Cluster 00000065000bfc00
Server with ClusterStorage 000000ab000ffc00
Server with HPC 000000e30013fc00
Server with Directory 000000890017fc00
Server with SMB 00000052001bfc00

http://linuxczar.net/articles/rhel-installation-numbers

Reply

10 Manoj Namdev January 27, 2014 at 4:46 am

Very nice artical, I have updated my epel.

Reply

11 avgh0$ March 24, 2014 at 3:19 pm

Enable RPMforge repository for CentOS/EL6 (uname -i for getting the architecture)
RPMforge provide over 5000 of important and valuable packages for CentOS/EL or RPM based distributions including wine and other popular media tools like vlc, mplayer, xmms-mp3 and it is not part of Red Hat or CentOS but is designed to work with those distributions.

in CentOS/EL6
->i686 http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
->x86_64 http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

Verify the package you have downloaded
rpm -K rpmforge-release-0.5.3-1.el6.rf.*.rpm

Install DAG’s GPG key
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

Install the package
rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm

in CentOS/EL5
->i386 http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm
->x86_64 http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm

Install DAG’s GPG key
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded
rpm -K rpmforge-release-0.5.3-1.el5.rf.*.rpm

Install the package
rpm -i rpmforge-release-0.5.3-1.el5.rf.*.rpm

in CentOS/EL4
->i386 http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el4.rf.i386.rpm
->x86_64 http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el4.rf.x86_64.rpm

Install DAG’s GPG key
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded
rpm -K rpmforge-release-0.5.3-1.el4.rf.*.rpm

Install the package
rpm -i rpmforge-release-0.5.3-1.el4.rf.*.rpm

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: