How to Install and Configure EPEL Repository on CentOS 5.8

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

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

[root@centos58 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-5

Example :

[root@centos58 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-5
--2012-05-12 05:01:11--  http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-5
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: 1698 (1.7K) [text/plain]
Saving to: `RPM-GPG-KEY-EPEL-5'

100%[==========================================================>] 1,698       --.-K/s   in 0s

2012-05-12 05:01:12 (42.2 MB/s) - `RPM-GPG-KEY-EPEL-5' saved [1698/1698]

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

[root@centos58 ~]# rpm --import RPM-GPG-KEY-EPEL-5

3. Download EPEL repository for 32-bit CentOS :

[root@centos58 ~]# wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Example :

[root@centos58 ~]# wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
--2012-05-12 05:04:03--  http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Resolving dl.fedoraproject.org... 209.132.181.25, 209.132.181.26, 209.132.181.27, ...
Connecting to dl.fedoraproject.org|209.132.181.25|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12232 (12K) [application/x-rpm]
Saving to: `epel-release-5-4.noarch.rpm'

100%[==========================================================>] 12,232      43.7K/s   in 0.3s

2012-05-12 05:04:04 (43.7 KB/s) - `epel-release-5-4.noarch.rpm' saved [12232/12232]

4. Install EPEL repository on 32-bit CentOS :

[root@centos58 ~]# rpm -ivh epel-release-5-4.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

5. You can start using EPEL repository :

# yum install package name -y
Example :

[root@centos58 ~]# yum install phpmyadmin -y