What is EPEL?
EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs, such as CentOS and Scientific Linux.
As part of the Fedora packaging community, EPEL packages are 100% free/libre open source software (FLOSS).
Installing RHEL EPEL Repo on Centos 5.x or 6.x
In the following article I will teach you how to configure a CentOS 5.x-based or Centos 6.x-based systems to use Fedora Epel repos and third party remi package repository. These package repositories are not officially supported by CentOS, but they provide much more current versions of popular applications like PHP or MYSQL.
Install the extra repositories
The first step requires downloading some RPM files which contains the additional YUM repository definitions. The instructions below point to the 64-bit versions that work with our Cloud Server instances.
CentOS 5.x :
wget https://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm wget https://rpms.famillecollet.com/enterprise/remi-release-5.rpm sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
CentOS 6.x :
wget https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget https://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
Once installed you should see some additional repo definitions under the /etc/yum.repos.d directory:
[root@geek-kb ~]# ls -l /etc/yum.repos.d/epel* /etc/yum.repos.d/remi* -rw-r--r-- 1 root root 957 Nov 5 2012 /etc/yum.repos.d/epel.repo -rw-r--r-- 1 root root 1056 Nov 5 2012 /etc/yum.repos.d/epel-testing.repo -rw-r--r-- 1 root root 1694 Oct 3 16:10 /etc/yum.repos.d/remi.repo
Enable remi repository
Remi repository provides a variety of up-to-date packages that are useful or are a requirement for many popular web-based services. That means it generally is not a bad idea to enable the remi repositories by default.
First, open the /etc/yum.repos.d/remi.repo repository file using a text editor of your choice:
Edit the [remi] portion of the file so that the enabled option is set to 1 (instead of 0). This will enable the remi repository.
Press ‘Ctrl + X’ to exit Nano and ‘Y’ to save the file.
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch #baseurl=https://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/ mirrorlist=https://rpms.famillecollet.com/enterprise/$releasever/remi/mirror enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi failovermethod=priority
You will now have a larger array of yum repositories from which to install.
I hope you liked this article, please feel free to leave comments or ask questions.