RHEL6 use yum source of CentOS6
1. Check version of kenel
uname -a
Linux RHEL6 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64
GNU/Linux
2. Download the following rpm package
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/python-pycurl-7.19.0-9.el6.x86_64.rpm
3.Remove the following rpm packages(or similar version) in RHEL6
yum-3.2.29-40.el6.noarch
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-rhn-plugin-0.9.1-48.el6.noarch
rhn-client-tools-1.0.0.1-16.el6.noarch
rhn-check-1.0.0.1-16.el6.noarch
rhn-setup-1.0.0.1-16.el6.noarch
rhnsd-4.9.3-2.el6.x86_64
subscription-manager-1.9.11-1.el6.x86_64
4. Install the downloaded rpm packages
rpm -ivh package_name
5. Delete original Repo file
cd /etc/yum.repos.d
mv rhel-source.repo rhel-source.repo.bak
6. Create CentOS.repo
[base]
name=CentOS-6 – Base – 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 – Updates – 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 – Extras – 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 – Plus – 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib – packages by Centos Users
[contrib]
name=CentOS-6 – Contrib – 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
7. Clear yum cache and test
yum clean all
yum makecache
yum install httpd