How to Install and Configure EPEL Repository on CentOS 6.2

Share this Article :

In this post, i will show you on how to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.2. EPEL repository is another extra repository 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) and CentOS server. To install the repository, you can follow this steps :

1. First we import the GPG keys for EPEL software packages:

[[email protected] ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
[[email protected] ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
--2012-03-07 22:08:39--  http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
Resolving ftp.riken.jp... 134.160.38.1
Connecting to ftp.riken.jp|134.160.38.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1649 (1.6K) [text/plain]
Saving to: âRPM-GPG-KEY-EPEL-6â

100%[==========================================================>] 1,649       --.-K/s   in 0.002s

2012-03-07 22:08:40 (929 KB/s) - âRPM-GPG-KEY-EPEL-6â

2. Then we enable the EPEL repositories using the following command :

[[email protected] ~]# rpm --import RPM-GPG-KEY-EPEL-6

3. Download EPEL repository for 32-bit CentOS :

[[email protected] ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
[[email protected] ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
--2012-03-07 22:06:10--  http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Resolving dl.fedoraproject.org... 209.132.181.27, 209.132.181.23, 209.132.181.24, ...
Connecting to dl.fedoraproject.org|209.132.181.27|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14064 (14K) [application/x-rpm]
Saving to: âepel-release-6-5.noarch.rpmâ

100%[==========================================================>] 14,064      36.7K/s   in 0.4s

2012-03-07 22:06:14 (36.7 KB/s) - âepel-release-6-5.noarch.rpmâ

4. Install EPEL repository on 32-bit CentOS :

[[email protected] ~]# rpm -ivh epel-release-6-5.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

5. Edit the the EPEL repository file and Set priority for the EPEL repository as below :

[[email protected] ~]# vi /etc/yum.repos.d/epel.repo

6. Add priority=3 to the [epel] section, under enabled=1 :

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=3
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

What packages and versions are available in EPEL?
You can take a look on any of the available EPEL mirrors from our mirror list

Alternately, you can browse the package set using repoview:

One Response

Leave a Reply