How to Configure RPMforge Repository on CentOS 6.3

centos6RPMforge repository is a collaboration of Dag, Dries, and other packagers. The default RPMforge repository does not replace any CentOS base packages. This post covers the steps to configure RPMforge repository on linux CentOS 6.3. This steps has been tested on CentOS 6.3 and should be working on Redhat linux Enterprise 6.

1. Download the rpmforge-release package and DAG’s GPG key :

[root@centos63 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
[root@centos63 ~]# wget wget http://apt.sw.be/RPM-GPG-KEY.dag.txt

2. Install DAG’s GPG key :

[root@centos63 ~]# rpm --import RPM-GPG-KEY.dag.txt

3. Verify the rpmforge-release package that you have downloaded :

[root@centos63 ~]# 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

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

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

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

[root@centos63 ~]# 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

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

[root@centos63 ~]# yum repolist
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * rpmforge: mirror.oscc.org.my
 * updates: mirrors.hostemo.com
repo id                                    repo name                                          status
CentOS6.3-Repository                       DVD-CentOS6.3 repository                           4,776
base                                       CentOS-6 - Base                                    4,776
extras                                     CentOS-6 - Extras                                      4
rpmforge                                   RHEL 6 - RPMforge.net - dag                        4,448
updates                                    CentOS-6 - Updates                                   202
repolist: 14,206

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

[root@centos63 ~]# yum install clamd -y

How to Install and Configure RPMforge Repository on CentOS 5.8

RPMforge repository is a collaboration of Dag, Dries, and other packagers. In this post i will show on how to install and configure RPMforge repository on linux CentOS 5.8 server. This steps has been tested on CentOS 5.8 and may working on CentOS 6.x as well.

1. Download the rpmforge-release package

[root@centos58 ~]# wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
--2012-05-15 06:21:51--  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 0s

2012-05-15 06:21:53 (46.0 MB/s) - `RPM-GPG-KEY.dag.txt' saved [1672/1672]

2. Import the RPMforge GPG key :

[root@centos58 ~]# rpm --import RPM-GPG-KEY.dag.txt

3. Download rpmforge-release :

[root@centos58 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

Example :

[root@centos58 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
--2012-05-15 06:23:18--  http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.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/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [following]
--2012-05-15 06:23:19--  http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.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/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [following]
--2012-05-15 06:23:20--  http://tree.repoforge.org/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.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/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [following]
--2012-05-15 06:23:21--  http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.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: 12680 (12K) [application/x-redhat-package-manager]
Saving to: `rpmforge-release-0.5.2-2.el5.rf.i386.rpm'

100%[==========================================================>] 12,680      12.6K/s   in 1.0s

2012-05-15 06:23:23 (12.6 KB/s) - `rpmforge-release-0.5.2-2.el5.rf.i386.rpm' saved [12680/12680]

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

[root@centos58 ~]# rpm -K rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpmforge-release-0.5.2-2.el5.rf.i386.rpm: (sha1) dsa sha1 md5 gpg OK

5. Install the rpmforge-release package using this command :

[root@centos58 ~]# rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

6. You can start using RPMforge Repository to install, remove and update the package as below :

[root@centos58 ~]# yum install package-name -y
[root@centos58 ~]# yum remove package-name -y
[root@centos58 ~]# yum update package-name -y

Resources :
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge

How to Install and Configure Lighttpd on CentOS 6.2

The Lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible. Lighttpd is an excellent tool for small to medium sized web sites. It is a web server for Linux/UNIX and Windows operating systems platform and is an alternative to Apache web server. In this post, i will show on how to setup Lighttpd on linux CentOS 6.2 server.

1. Install and configure PMforge Repository on CentOS 6.2 :
How to Add the RPMforge Repository on CentOS 6/RHEL 6 Linux Server

2. Install lighttpd using yum command :

[root@centos62 ~]# yum install lighttpd -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * extras: centos.ipserverone.com
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: centos.ipserverone.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package lighttpd.i686 0:1.4.28-2.el6.rf will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package               Arch              Version                        Repository             Size
====================================================================================================
Installing:
 lighttpd              i686              1.4.28-2.el6.rf                rpmforge              706 k

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 706 k
Installed size: 2.6 M
Downloading Packages:
lighttpd-1.4.28-2.el6.rf.i686.rpm                                            | 706 kB     00:08
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : lighttpd-1.4.28-2.el6.rf.i686                                                    1/1

Installed:
  lighttpd.i686 0:1.4.28-2.el6.rf

Complete!

3. Configure Lighttpd starts automatically when boot up :

[root@centos62 ~]# chkconfig --levels 235 lighttpd on

or

[root@centos62 ~]# chkconfig lighttpd on

4. Open /etc/lighttpd/lighttpd.conf :

[root@centos62 ~]# vi /etc/lighttpd/lighttpd.conf

Make sure server.use-ipv6 is set to “disable” :

##
## Use IPv6?
##
server.use-ipv6 = "disable"

5. The server.document-root is located at /srv/www/lighttpd. Upload or create the following index.html to test your web server :

[root@centos62 ~]# vi /srv/www/lighttpd/index.html

Add this html code into index.html

<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Lighttpd Test Page on CentOS 6.2
</div>
</body>
</html>

6. Start lighttpd :

[root@centos62 ~]# /etc/init.d/lighttpd start
Starting lighttpd:                                         [  OK  ]

7. Browser your server ip address :
http:server_ip_address
Lighttpd

How to Install and Configure yum-priorities on CentOS 5/RHEL 5 Linux Server

In this post, i will show on how to install and configure yum-priorities on CentOS 5 or RHEL 5 Linux server. Theoretically, the repositories with the lowest numerical priority number have the highest priority. This is one of the method to prevents mistakes such as accidentally running yum upgrade with everything. This steps has been tested on CentOS 5.7, but it may working on CentOS 5.1, CentOS 5.2, CentOS 5.4, CentOS 5.5, CentOS 5.6 and RHEL 5.

1. To Install the yum-priorities, simply run this command :

[root@CentOS57 ~]# yum install yum-priorities -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.oscc.org.my
 * extras: mirror.oscc.org.my
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: mirror.oscc.org.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-priorities.noarch 0:1.1.16-21.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch              Version                          Repository       Size
====================================================================================================
Installing:
 yum-priorities            noarch            1.1.16-21.el5.centos             base             16 k

Transaction Summary
====================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 16 k
Downloading Packages:
yum-priorities-1.1.16-21.el5.centos.noarch.rpm                               |  16 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : yum-priorities                                                               1/1

Installed:
  yum-priorities.noarch 0:1.1.16-21.el5.centos

Complete!

2. After the plugin is installed, make sure that it is enabled on /etc/yum/pluginconf.d/priorities.conf file.

[root@CentOS57 ~]# cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1

If enabled = 0, you can enabled it using vi editor as below :

[root@CentOS57 ~]# vi /etc/yum/pluginconf.d/priorities.conf

3. With the plugin enabled, you may add priorities to the target repositories by adding the following line :

priority=N

Where N is an integer from 1 to 99. The lower the number the more important it is, so CentOS-Base.repo must always the lowest.

[root@CentOS57 ~]# vi /etc/yum.repos.d/CentOS-Base.repo

Add this line on base repo :

priority = 1
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#


[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority = 1

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

4. As an example, another 3rd party repository is RPMforge. Follow this steps to Add the RPMforge Repository on CentOS 5/RHEL 5 Linux Server :
How to Add the RPMforge Repository on CentOS 5/RHEL 5 Linux Server

Open the RPMforge configuration file and insert “priority = 5” after “enabled = 1” in the [rpmforge] section :

[root@CentOS57 ~]# vi /etc/yum.repos.d/rpmforge.repo

In this case, i will add the fifth highest possible priority which is “priority=5” :

### Name: RPMforge RPM Repository for RHEL 5 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
priority = 5
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/el5/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el5/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/el5/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el5/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

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

In this post i will show on how to add the RPMforge repository into CentOS 5 and Linux Red Hat Enterprise Linux 5 (RHEL 5) and also applicable on CentOS 5.1,CentOS 5.2,CentOS 5.3,CentOS 5.4,CentOS 5.5 and CentOS 5.6. RPMforge repository is a collaboration of Dag, Dries, and other packagers. This steps has been tested on CentOS 5.7 and should be working on RHEL 5.

RHEL 5 and CentOS 5 x86 32bit
RHEL 5 and CentOS 5 x86 64bit

1. Import the RPMforge GPG key :

[root@CentOS57 ~]# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
[root@CentOS57 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
[root@CentOS57 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
--2012-03-13 03:36:08--  http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.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/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [following]
--2012-03-13 03:36:09--  http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.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/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [following]
--2012-03-13 03:36:10--  http://tree.repoforge.org/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.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/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [following]
--2012-03-13 03:36:10--  http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.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: 12680 (12K) [application/x-redhat-package-manager]
Saving to: `rpmforge-release-0.5.2-2.el5.rf.i386.rpm'

100%[==========================================================>] 12,680      23.3K/s   in 0.5s

2012-03-13 03:36:13 (23.3 KB/s) - `rpmforge-release-0.5.2-2.el5.rf.i386.rpm' saved [12680/12680]

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

[root@CentOS57 ~]# rpm -K rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpmforge-release-0.5.2-2.el5.rf.i386.rpm: (sha1) dsa sha1 md5 gpg OK

4. Install the rpmforge-release package using this command :

[root@CentOS57 ~]# rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

5. You can start using RPMforge Repository to install, remove and update the package as below :

[root@CentOS57 ~]# yum install package-name -y
[root@CentOS57 ~]#  yum remove package-name -y
[root@CentOS57 ~]#  yum update package-name -y

Resources :
RPMforge CentOS Wiki

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

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

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# rpm --import RPM-GPG-KEY.dag.txt

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

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# yum install package-name -y
[root@rhel6 ~]# yum remove package-name -y
[root@rhel6 ~]# yum update package-name -y

Reference :
RPMforge CentOS Wiki