How to convert Redhat Enterprise Linux to CentOS and use yum

Why do you want to do this?

Well, this is for those who don’t need support, but happen to have the install cds for RHEL and do need updates.

Centos pretty much is the same as Redhat except that they are compiled on different machines and possible are compiled with different compilers. You can get more information at http://www.centos.org.

I think the way the versioning works is like this:

Redhat 3 update 7: CentOS 3.7

Redhat 4 update 2: CentOS 4.2

Redhat 4 update 3: CentOS 4.3

You get the drift.

Here’s the list of RPMs you’ll need. I just run wget for each of them.

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 4.i386.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 1.i386.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … noarch.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 2.i386.rpm

wget http://mirror.stanford.edu/yum/pub/cent … 1.i386.rpm

After grabbing them all, I just install all of them:

Make sure you don’t have other rpms in the directory and run:

rpm –force -ivh *.rpm

Reason for the force is because it conflicts with redhat-release-4ES-5.4. I don’t care too much about that.

Now, you’re on CentOS. To upgrade packages now, just run:

yum update

Another thing that’s cool about this is that you don’t have to bother resolving dependencies cause YUM does it for you. To install a package for example, gcc, just run:

yum install gcc

up2date does the same, but you’ll need Redhat’s subscription.

3 thoughts on “How to convert Redhat Enterprise Linux to CentOS and use yum”

  1. This worked great for me to go from RHEL 4.4 to Centos 4.4. I got the files from http://vault.centos.org/4.4/os/i386/CentOS/RPMS/. Don’t worry that “centos-yumconf” isn’t there. You don’t need it. P.S. Make sure you use two “-” with the “rpm –force” command. The ps/2 keyboard and mouse didn’t work after upgrade but I hot-plugged a usb keyboard and mouse and it worked fine.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.