Installing RHEL EPEL Repo on Centos 5 and 6

T

his tutorial works for CentOS only. For your specific OS tutorial use the tags or serach function in the sidebar area.

 

If you have CentOS or RHEL on your VPS, it's wise that you ADD an EPEL (Extra Packages for Enterprise Linux) repository to Yum, with which you can install any of close to 7,000 EPEL packages. EPEL is a community effort to create a repository of high-quality add-on freeware packages for RHEL-based distributions.

Determine your CentOS version:

$ cat /etc/redhat-release

[root@server][~]
$ cat /etc/redhat-release
CentOS release 6.4 (Final)
 

Centos 5.x

$ wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
$ wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
$ sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
 

Centos 6.x

$ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
 

Now check:

$ ls -1 /etc/yum.repos.d/

[root@server][~]
$ ls -1 /etc/yum.repos.d/
CentOS-Base.repo
CentOS-Debuginfo.repo
CentOS-Media.repo
CentOS-Vault.repo
epel-testing.repo
epel.repo
mirrors-rpmforge
mirrors-rpmforge-extras
mirrors-rpmforge-testing
remi.repo
rpmforge.repo
rpmforge.repo.rpmnew
vz.repo
 

Now you can enable repo editing .repo files, for example

change enabled=0 to enabled=1

[remi]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
 

Confirm:

$ yum repolist

[root@server][~]
$ yum repolist
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: mirrors.lga7.us.voxel.net
* epel: mirror.cogentco.com
* extras: mirror.symnds.com
* remi: mirrors.mediatemple.net
* rpmforge: mirror.teklinks.com
* updates: mirror.ash.fastserv.com
1208 packages excluded due to repository priority protections
repo id repo name status
base CentOS-6 - Base 4802
epel Extra Packages for Enterprise Linux 6 - i386 6752 1082
extras CentOS-6 - Extras 12
remi Les RPM de remi pour Enterprise Linux 6 - i386 968 111
rpmforge RHEL 6 - RPMforge.net - dag 4642 16
updates CentOS-6 - Updates 808
vz-base vz-base 3
vz-updates vz-updates 0
repolist: 17987
 

Done.