How to set up Repoforge repository on CentOS

Repoforge, previously known as RPMforge, maintains a repository of RPM packages for Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux. If you are a RHEL or CentOS user, I strongly suggest you set up Repoforge repository on your system, as it contains many useful software packages that are not available in existing stock repositories.

Check CentOS System Properties

In order to set up Repoforge repository on CentOS, you first need to know two things: (1) the version of your CentOS and (2) the underlying kernel architecture (e.g., 32-bit or 64-bit).

To find out which release version of CentOS you are using:

$ cat /etc/redhat-release
CentOS release 6.3 (Final)

To check whether your CentOS kernel is 32-bit (i.e., i686) or 64-bit (i.e., x86_64) based:

$ uname -a
Linux centos.domain 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Import Repoforge GPG key

Next, import the Repoforge RPM repository’s official GPG key. That way, you will be able to validate all the RPM packages from the repository using the key.

$ sudo rpm –import

After running the above command, verify that the key has been imported successfully with:

$ yum-config-manager rpmforge | grep gpgkey
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag

Without importing the key in this step, you will see the following warning when you attempt to install a Repoforge RPM file later.

warning: /var/tmp/rpm-tmp.rHqPLd: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY

Enable Repoforge on CentOS

Now that you know enough about your CentOS system and imported the official GPG key, let’s go ahead and install Repoforge RPM on CentOS.

64-bit CentOS 7:

$ sudo rpm -Uvh

Note that there is no 32-bit version of CentOS 7.

64-bit CentOS 6:

$ sudo rpm -Uvh

32-bit CentOS 6:

$ sudo rpm -Uvh

64-bit CentOS 5:

$ sudo rpm -Uvh

32-bit CentOS 5:

$ sudo rpm -Uvh

Verify Repoforge Repository Status

Once Repoforge is installed on your system, you can verify its status by running:

$ yum repolist

If Repoforge is enabled successfully, you will see “rpmforge” shown in the repository list.

Post-install Step

In general, it is not a good idea to keep Repoforge enabled as it could potentially cause conflicts with other third-party packages such as EPEL. Instead, it is better to disable Repoforge, and then enable it only when you need to install any package from Repoforge. So let’s disable Repoforge for now with the command below:

$ sudo yum-config-manager –disable rpmforge

If successful, the subsequent output should display “enabled=0”.

Now if you want to install any package from Repoforge repository, use the following command.

$ sudo yum –enablerepo=rpmforge install [package-name]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.