If you’re missing a few basic packages from the default CentOS repositories, it may be a good idea to install the EPEL (Extra Packages for Enterprise Linux) repository. The packages inside that repository aim to be compatible with the base packages provided by Red Hat Enterprise Linux (RHEL) and CentOS, so the most common of the Enterprise Linux’s out there.
To install the EPEL repository, issue the following commands as the root user from the command line.
Installing the EPEL repository
For CentOS 5
# rpm -Uvh 'http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
While the command above shows i386 in the URL name, it’s a version that is actually ‘noarch’ – meaning it works for i386, i686 and x86_64.
For CentOS 6
# rpm -Uvh 'http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm'
The same as the CentOS 5 install, while the download URL displays i386, it’s compatible with i386, i686 and x86_64.
Using the EPEL repository
Installing is one thing, using the repository is the next logical step. To get started, first verify a few things.
# yum clean all # yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile ... epel Extra Packages for Enterprise Linux 5 - i386 5,736 ... repolist: 9,370
The yum repolist will show you that the EPEL repository has 5,736 packages available. If you simply run a “yum install package", it will automatically use that repository if it contains the latest version.
To update your system with the latest packages from the EPEL repository, it’s sufficient to run a “yum update".