CentOS6.2: Install EPEL Repository

 

Overview

* EPEL stands for Extra Packages for Enterprise Linux

Install using yum

yum install epel-release

Manual Install

Select a Mirror Site

* Go to EPEL public mirrors site at Fedora EPEL Public Active Mirrors
* Click the appropriate architecture from the Mirror list filter, e.g. EPEL/6/x86_64

* Select a mirror site, e.g. U. of Maryland, and click http link

Import GPG Key

* Locate appropriate GPG key, e.g. RPM-GPG-KEY-EPEL-6:

* Download key:

wget http://mirror.umd.edu/fedora/epel/RPM-GPG-KEY-EPEL-6
[root@localhost ~]# wget http://mirror.umd.edu/fedora/epel/RPM-GPG-KEY-EPEL-6
--2012-09-04 09:36:22--  http://mirror.umd.edu/fedora/epel/RPM-GPG-KEY-EPEL-6
Resolving mirror.umd.edu... 129.2.73.2
Connecting to mirror.umd.edu|129.2.73.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1649 (1.6K) [application/octet-stream]
Saving to: “RPM-GPG-KEY-EPEL-6”
 
100%[======================================>] 1,649       --.-K/s   in 0s      
 
2012-09-04 09:36:22 (88.7 MB/s) - “RPM-GPG-KEY-EPEL-6” saved [1649/1649]

* Import key:

rpm --import RPM-GPG-KEY-EPEL-6

Download EPEL Repository

* Download appropriate EPEL repository RPM file, e.g. epel-release-6-7.noarch.rpm

wget http://mirror.umd.edu/fedora/epel/6/i386/epel-release-6-7.noarch.rpm
[root@localhost ~]# wget http://mirror.umd.edu/fedora/epel/6/i386/epel-release-6-7.noarch.rpm
--2012-09-04 09:44:16--  http://mirror.umd.edu/fedora/epel/6/i386/epel-release-6-7.noarch.rpm
Resolving mirror.umd.edu... 129.2.73.2
Connecting to mirror.umd.edu|129.2.73.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14496 (14K) [application/x-redhat-package-manager]
Saving to: “epel-release-6-7.noarch.rpm”
 
100%[======================================>] 14,496      --.-K/s   in 0.1s    
 
2012-09-04 09:44:17 (105 KB/s) - “epel-release-6-7.noarch.rpm” saved [14496/14496]

* Install downloaded RPM, e.g.

rpm -ivh epel-release-6-7.noarch.rpm
[root@localhost ~]# rpm -ivh epel-release-6-7.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

Setup EPEL Repository

* Set EPEL repo priority to 3, i.e. priority=3

vi /etc/yum.repos.d/epel.repo
[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

Verify EPEL Repository

* Command: yum repolist

[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink                                            |  13 kB     00:00     
 * base: centos.mirror.netriplex.com
 * epel: mirror.us.leaseweb.net
 * extras: centos.mbni.med.umich.edu
 * updates: mirrors.lga7.us.voxel.net
epel                                                     | 4.3 kB     00:00     
epel/primary_db                                          | 4.7 MB     00:08     
repo id          repo name                                                status
base             CentOS-6 - Base                                          6,346
epel             Extra Packages for Enterprise Linux 6 - x86_64           7,746
extras           CentOS-6 - Extras                                            4
updates          CentOS-6 - Updates                                         517
repolist: 14,613

Debug

URLGRABBER_DEBUG=1 yum repolist

References

* How to Install and Configure EPEL Repository on CentOS 6.2

This entry was posted in centos and tagged , , , , . Bookmark the permalink.

Leave a Reply

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


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.