RHEL 5 to CentOS 5

I used VirtualBox to install RHEL v5.4 today, as we’re going to use it to host our web application.

The install completed successfully, and then I realized that some kind of subscription plan is required to issue ‘yum’ commands.

So there I was, stuck with an outdated RHEL5 system (circa September 2009, the box tells me), and no RHN login in sight. Great.

Some Google-ing uncovered this article, which pretty much works, except I had to make a few edits here and there.

I thought to repost here instead, in case I ever have to convert RHEL to CentOS again.

It’s an excerpt of root’s commands:

# remove cached packages
yum clean all

# create /root/centos/
mkdir ~/centos
cd ~/centos

# import CentOS's GPG key
wget http://mirror.centos.org/centos/5.4/os/i386/RPM-GPG-KEY-CentOS-5
rpm --import RPM-GPG-KEY-CentOS-5

# web get base packages
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/centos-release-5-4.el5.centos.1.i386.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/centos-release-notes-5.4-4.i386.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm

# install using 'rpm'
rpm -Uvh centos*.rpm
rpm -Uvh yum*.rpm

# clear RHN stuff
rpm -e --nodeps redhat-release
rpm -e --nodeps yum-rhn-plugin

# upgrade to heart's content
yum upgrade

At this moment, the update is buzzing along quite well, thanks to NUS’s mirror.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s