Install epel and rpmforge repository CentOS 6


Install rpmforge Repository
Download the rpmforge-release package. Choose one of the two links below, selecting to match your host’s architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

# cd /opt

-For CentOS 6 i686 (32bit):
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

-For CentOS 6 x86_64 (64bit):
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

-Install DAG’s GPG key:
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

-Install rpmforge repo
# rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

-Disable rpmforge repo (Optional)
# 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 = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

 
If you want to install package from rpmforge type like this:
# yum --enablerepo=rpmforge install [package name]

-Testing
# yum --enablerepo=rpmforge install htop

 

Install epel Repository
-Download & Install epel Repo
# cd /opt
# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

-Install epel gpg key
# rpm --import https://fedoraproject.org/static/0608B895.txt

-Install epel repo
# rpm -ivh epel-release-6-8.noarch.rpm

-Disable epel Repo (Optional)
# vi /etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

 
If you want to install package from epel type like this:
# yum --enablerepo=epel install [package name]

-Testing
# yum --enablerepo=epel install htop

 
References:
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge/
http://wiki.centos.org/AdditionalResources/Repositories
http://fedoraproject.org/wiki/EPEL


Leave a Reply

Your email address will not be published. Required fields are marked *