Converting from a RHEL install to a CentOS install

Posted on December 5th, 2011 by Wayne May in Web Servers | 2 comments

A couple of days ago I received a RHEL (Red Hat Enterprise Linux) Virtual Machine image from our IT support team. The problem was that the image was made using an evaluation copy of Red Hat. I figured I would convert it to CentOS, since there is no registration required. Here is what I did, and maybe it will help you if you need to upgrade a server with an expired subscription. From the root of your filesystem:

#yum clean all
#mkdir /usr/src/centos
#cd /usr/src/centos
#wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#wget http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-5-5.el5.centos.i386.rpm
#wget http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-notes-5.5-0.i386.rpm
#wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
#wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
#wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
#rpm --import RPM-GPG-KEY-CentOS-5
#/bin/rpm -e --nodeps redhat-release
#/bin/rpm -e --nodeps rhn-client-tools
#/bin/rpm -e --nodeps yum-rhn-plugin
#rpm -Uvh --force *.rpm
#yum upgrade
#reboot

That should do the trick!

John Huh

Posted on January 10, 2012 at 1:32 pm

You are nuts! Thanks for the great tip.

Wayne May

Posted on January 10, 2012 at 8:43 pm

You are most welcome!

Post a comment

Hello guest, care to post a comment?