How to Add the RPMforge Repository on CentOS 6/RHEL 6 Linux Server

Share this Article :

In this post i will show on how to add the RPMforge repository into Linux Red Hat Enterprise Linux 6 (RHEL 6) and also applicable on CentOS 6. RPMforge repository is a collaboration of Dag, Dries, and other packagers. This steps has been tested on RHEL 6 and should be working on CentOS 6. Assumed only one repository exist in /etc/yum.repos.d which is local yum repository using DVD Media.

RHEL 6 and CentOS 6 x86 32bit
RHEL 6 and CentOS 6 x86 64bit

1. Download the rpmforge-release package

[[email protected] ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
--2012-03-12 03:37:06--  http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Resolving pkgs.repoforge.org... 78.46.17.228
Connecting to pkgs.repoforge.org|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://rpmforge.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm [following]
--2012-03-12 03:37:07--  http://rpmforge.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Resolving rpmforge.sw.be... 78.46.17.228
Connecting to rpmforge.sw.be|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://tree.repoforge.org/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm [following]
--2012-03-12 03:37:09--  http://tree.repoforge.org/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Resolving tree.repoforge.org... 78.46.17.228
Connecting to tree.repoforge.org|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm [following]
--2012-03-12 03:37:10--  http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Resolving apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12732 (12K) [application/x-redhat-package-manager]
Saving to: ârpmforge-release-0.5.2-2.el6.rf.i686.rpmâ

100%[==========================================================>] 12,732      16.7K/s   in 0.7s

2012-03-12 03:37:12 (16.7 KB/s) - ârpmforge-release-0.5.2-2.el6.rf.i686.rpmâ

2. Download DAG’s GPG key :

[[email protected] ~]# wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
--2012-03-12 03:41:16--  http://apt.sw.be/RPM-GPG-KEY.dag.txt
Resolving apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1672 (1.6K) [text/plain]
Saving to: âRPM-GPG-KEY.dag.txtâ

100%[==========================================================>] 1,672       --.-K/s   in 0.007s

2012-03-12 03:41:18 (249 KB/s) - âRPM-GPG-KEY.dag.txtâ

3. Install DAG’s GPG key :

[[email protected] ~]# rpm --import RPM-GPG-KEY.dag.txt

4. Verify the rpmforge-release package you have downloaded :

[[email protected] ~]# rpm -K rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpmforge-release-0.5.2-2.el6.rf.i686.rpm: (sha1) dsa sha1 md5 gpg OK

5. If ok, proceed to install the rpmforge-release package using this command :

[[email protected] ~]# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

6. Proceed to configure RPMforge repository. Open the RPMforge configuration file and insert “priority=3” after “enabled = 1” in the [rpmforge] section as below :

[[email protected] ~]# vi /etc/yum.repos.d/rpmforge.repo
### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
priority=3
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

7. Check the updated repository list in /etc/yum.repos.d using the following command :

[[email protected] ~]# yum repolist
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
repo id                                 repo name                                             status
DVD-RHEL6-Repository                    DVD-RHEL6 repository                                  2,646
rpmforge                                RHEL 6Server - RPMforge.net - dag                     4,289
repolist: 6,935

8. You can start using RPMforge Repository on your RHEL 6 or CentOS 6 linux server.

Start install, remove and update using RPMforge :

[[email protected] ~]# yum install package-name -y
[[email protected] ~]# yum remove package-name -y
[[email protected] ~]# yum update package-name -y

Reference :
RPMforge CentOS Wiki

Leave a Reply