Wednesday, September 14, 2011

Point RHEL 6 installation to Centos6 repositories



Migrating from RHEL6 to CentOS 6






vi /etc/yum.repo.d/centos.repo

[centos]
name=CentOS $releasever - $basearch
baseurl=http://ftp.heanet.ie/pub/centos/6/os/$basearch/
enabled=1

gpgcheck=0


yum remove matahari*


edit /etc/yum.conf

exclude=redhat-logos redhat artwork












mkdir TMP

yum remove rhnlib abrt-plugin-bugzilla
yum remove redhat-release-notes*



rpm -e --nodeps redhat-release redhat-indexhtml

for 64 bit version use
rpm -e --nodeps redhat-release-server.x86_64
rpm -e --nodeps redhat-indexhtml-6-1.el6.noarch



cd TMP

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-0.el6.centos.5.x86_64.rpm

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-indexhtml-6-1.el6.centos.noarch.rpm

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

rpm -Uvh *.rpm
cd ..
rm -rf TMP
yum clean all
yum upgrade

voila, your Redhat machine can now get updated from the Centos repositories

No comments: