Search This Blog

Loading...

Monday, July 6, 2009

Convert RHEL 5 to CentOS 5

I was setting up some test environments and didn’t want to bother with Red Hat Network. Rather than creating a CentOS machine from scratch, I converted a Redhat Enterprise Linux 5 machine to CentOS 5. Here are the commands I ran.

yum clean all
mkdir ~/centos
cd ~/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-2.el5.centos.i386.rpm
wget http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-notes-5.2-2.i386.rpm
wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm
wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
rpm –import RPM-GPG-KEY-CentOS-5
rpm -e –nodeps redhat-release
rpm -e yum-rhn-plugin
rpm -Uvh –force *.rpm
yum upgrade

I’m not quite sure if it totally worked, because I see some packages being updated with a suffix of .el5 rather than .centos (I haven’t really used CentOS before, this may be normal), but the RHN messages are gone.

(http://gr33do.com/index.php/2008/07/convert-rhel-5-to-centos-5/)

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails