Thursday, November 10, 2011

CentOS 6 RPMForge/EPEL Repositories

SkyHi @ Thursday, November 10, 2011

Server CentOS
The primary reason for adding these repositories is that neither the CentOS repository nor the rpmforge repository contain the same packages that were available in CentOS 5.x. There is some serious lag time which will cripple your ability to move to CentOS 6. Therefore, in order to gain access to all of the necessary packages you will need to add these two repositories. Unfortunately, this is an unsatisfactory solution as the more repositories you add the greater the chance you will have package conflicts. At this point in time however, this cannot be avoided. In order to minimize the impact of using multiple repositories it is important to use yum-priorities.
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
warning: rpmforge-release-0.5.2-2.el6.rf.i686.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]

http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

wget http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

rpm -ivh epel-release-6-5.noarch.rpm
warning: epel-release-6-5.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]

Once you have added the repositories verify they exist in /etc/yum.repos.d

CentOS-Base.repo CentOS-Media.repo epel-testing.repo mirrors-rpmforge-extras rpmforge.repo
CentOS-Debuginfo.repo epel.repo mirrors-rpmforge mirrors-rpmforge-testing

BEWARE: There are testing repos that are also added. These repos are dangerous to use on a production machine.

Edit the /etc/yum.repos.d/CentOS-Base.repo and add priorities to these three:

[base]
priority=1

[updates]
priority=1

[extras]
priority=1

Now access the rpmforge.repo and edit one repository, the others are disabled, to make it 5 in priority.
[rpmforge]
priority=5

Finally, edit epel.repo and make it 11 in priority.

[epel]
priority=11

The purpose of the priorities for a production server is to maintain as much stability as possible with access to packages that are not in the CentOS 6 repository. The numbers represent the most important repository as the CentOS repo, then if packages are not located the rpmforge.repo will be accessed and last the epel.repo. The epel.repo, which is Fedora, is likely to introduce packages slightly ahead of current CentOS packages. Again, this is not a perfect solution, but if you need packages outside of the CentOS repositories you do not have many options.

REFERENCES