Migrating RHEL 4.7 to CentOS 4.7

Recently I was asked by one of my clients to convert their RHEL system to CentOS after their RHEL subscription expired. At the time of migration the server was running RHEL 4 update 7. Based on the current version, I chose the target version as CentOS 4.7.

Before conversion I chose one of the mirrors as a source of packages and installed the CentOS 4 GPG key as follows:

# rpm --import http://mirrors.portafixe.com/centos/RPM-GPG-KEY-CentOS-4

After the GPG key was installed, I downloaded few RPMs from the mirror and installed them manually as follows:

# mkdir /tmp/centos && cd /tmp/centos
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/centos-release-4-7.x86_64.rpm
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.x86_64.rpm
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/sqlite-3.3.6-2.x86_64.rpm
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm
# wget http://mirrors.portafixe.com/centos/4.7/os/x86_64/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm

# rpm --erase --nodeps redhat-release up2date up2date-gnome
# rm -rf /etc/sysconfig/rhn
# rpm -Uvh *.rpm
# yum update

That’s this completes the migration from RHEL 4.7 to CentOS 4.7

You may want to generate a list of packages with their last upgrade date. The list of packages the which were not upgraded will be at the last of output with dates before the date of the upgrade. Save the output to a file or read it using one of the filters like less.

# rpm -qa --last

At my end I also did the additional clean-up as follows:

# rpm --erase --nodeps rpmdb-redhat rhnlib rhn-applet
# yum install rpmdb-CentOS
This entry was posted in FLOSS and tagged , , . Bookmark the permalink.

Leave a Reply