Deutsch

View FAQ entry #23

Back

How to enable the 3rd party repository "rpmforge" in CentOS 5.x?
Written on by - 31204 views so far.

 

RPMForge is a 3rd party repository which provides additional tools and programs not found in the "official" repositories shipped with CentOS. The original description of RPMForge states:

 

RPMforge is a collaboration of Dag, Dries, and other packagers. They provide over 4000 packages for CentOS, including mplayer, xmms-mp3, and other popular media tools. It is not part of RedHat or CentOS but is designed to work with these major distributions. Packages are supplied in RPM format and in most cases are ready to use. Beware that some packages are newer than the official CentOS version and you should not blindly install those packages. Before you replace a CentOS package you should make sure that will not break anything important. In most cases you can revert any mistakes but it is best to avoid the mess.

 

To avoid overwriting of CentOS packages by possible newer versions from RPMForge it is highly recommended to install first the Yum-Priorities plugin. This plugin allows to protect the CentOS base installation packages by using priorities for the different repositories. So before start with anything, first install the yum-priorities plugin:

 

yum install yum-priorities

 

After installation make sure that the plugin is enabled, this can be checked in the file /etc/yum/pluginconf.d/priorities.conf. You should see inside this file something like this:

 

[main]
enabled=1

 

Next you have to enter the priorities for the existing CentOS repositories. These files are stored in the directory /etc/yum.repos.d/ and have the file extension ".repo". Open them one by one and add the following line to the repositories:

 

priority=N

 

N is an integer ranging from 1 - 99.

 

Recommended values for the different CentOS repositories are as follows:

 

base], [addons], [updates], [extras] ... priority=1

[centosplus],[contrib] ... priority=2

Third Party Repos like rpmforge ... priority=N (use N > 10 , exact value does not matter)

 

After all files are correctly edited you have to download now the rpmforge RPM file which matches your installation (use wget to fetch the rpm directly to your system):

 

 

You can find a complete list of all available RPMs unter the link http://dag.wieers.com/packages/rpmforge-release/ , however for CentOS 5.x one of the 2 listed links should be okay.

 

Before you install the RPM for your system install first the GPG key from DAG (maintainer):

 

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

If you get an error from rpm try downloading the given url first with wget and install the result keyfile RPM-GPG-KEY.dag.txt with rpm --import.

Now check the signature of the downloaded RPM with the key:

 

rpm -K rpmforge-release-*.rpm

If everything is fine install now the RPM:

 

rpm -i rpmforge-release-*.rpm

Don't forget to enter the correct priority to the rpmforge.repo file after it has been installed as described above.

Now finally it is time to check if everything is working as expected, so enter:

 

yum check-update

During the priority protection several packages will be "excluded" from Yum, you should see something like this:

 

Loading "priorities" plugin
...
76 packages excluded due to repository priority protections

The number of excluded packages depends on the amount of already installed packages, so you may see other numbers.

If you got this output your installation of the rpmforge repository is now finished. To install i.e. OpenVPN all you have to do is enter:

 

yum install openvpn

This will install OpenVPN including all dependencies from RPMForge.

 

Hope this short explanation was useful.



Back | Top