Saturday, April 04, 2009

Adding RPMForge Repository to CentOS

Even though I am a big fan of Ubuntu for the desktop, I prefer a Red Hat distribution for runnig my servers. I do not want to pay for them so I tried Fedora to run on the two (now three) servers at home. I finally decided upon CentOS 5.1 and have successfully upgraded one of my three servers to CentOS 5.3. My newest aquisition is a Proliant ML370 G2 (1 Pentium III 1.4Ghz CPU, 1.2GB memory and 6x37.4GB SCSI hard drives) and it is running CentOS 5.3 installed from DVD. I use the extras that comes with CentOS at install time but I like packages on the RPMForge repository.

Adding the RPMForge repository requires adding a rpmforge.repo file and installing the GPG key for the repository so packages won't fail rpm/yum install.

Here is where the rpmforge.repo goes:

/etc/yum.repo.d/rpmforge.repo:

Here is the contents of the aforementioned file:

# Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
# URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1


I found instructions on the DAG FAQ at the following URL:

http://dag.wieers.com/rpm/FAQ.php#B

The command I used was for Red Hat Enterprise Linux 5:

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm