Red Hat CentOS Yum Repositories

This is my summary of Yum repositories for future reference. Yum (and apt on Debian systems) is an easy way to install software on Red Hat/CentOS systems and to keep those systems up-to-date. There are a variety of repositories with different software packages available which is why I like to use most of the following repositories. To install a new package with yum:

yum install packagename

To search for available packages

yum list php*

For more info

man yum

Don’t forget you can install the yum-priorities package, then add priority=1 or priority=5 – any number to set a priority for the particluar repo. I usually set the centos ones to 1, rpmforge to 5 and the others to about 10.
CentOS
The main yum repositories are installed by default and you will find them at: /etc/yum.repos.d
They will be named CentOS-Base.repo and CentOS-Media.repo
Enable the sections you want in these files and set priority=1 as we prefer the well tested versions of software.

RPMForge
RPMforge has a wider range of packages available than the standard Red Hat/CentOS repositories including: clam, phpmyadmin
Installation instructions are at: http://www.rpmrepo.org/RPMforge/Using
Following these instructions for CentOS 5 64-bit we would install with:

su -c ‘rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm’

Check the rpmforge.repo file is now in /etc/yum.repos.d and add a priority=5 line if you want.

IUS

The IUS Community provides more up-to-date versions of PHP, MySQL and Python with version names that do not conflict with the base repositories e.g. yum install php53

rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/

EPEL
I used the EPEL repository at one point to get a specific PHP version which had not been released (and tested) on the other repositories and also a fairly specific scientific program. Installation instructions are at: http://fedoraproject.org/wiki/EPEL/FAQ#howtouse
For example for CentOS x86:

su -c ‘rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm’

REMI
I used the REMI repository at one point to get a specific
PHP version which had not been released (and tested) on the other
repositories . Installation
instructions are at: http://dev.antoinesolutions.com/remi-repository
For example for CentOS x86:

su -c ‘rpm -Uvh http://rpms.famillecollet.com/el5.i386/remi-release-5-6.el5.remi.noarch.rpm

Atomic ART
The Atomic repository has some extra packages mainly focused at servers running Plesk but I found the packages for OpenVAS on there that were not available on other repositories.
Download the following shell script:

wget http://atomicorp.com/installers/atomic

Make it executable and then run it.

chmod +x atomic && ./atomic

Answer the questions and you will have the atomic.repo file in /etc/yum.repos.d

Summary
For all these repositories it is worth checking the /etc/yum.repos.d/*.repo files for the following options:

  1. Enable the RepositoryChange enabled=0 to enabled=1
  2. Set priority for the RepositoryAdd priority=3 to the end of the section

Using extra package repositories makes life easier for being notified of updates and installing new packages/updates, however if a package is not available or you need extra configuration you can always compile the traditional way ./configure make make install

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>