How to upgrade my centos4.4 to centos5.0 from internet?

This is a "general" guideline for a CentOS 4.4 Server CD install upgrade via yum.

YMMV with additionally installed RPMS and RPMS from third party Repositories.

I did a fresh install of the x86_64 Server 4.4 CD (everything) for this migration test.

Now that I have a CentOS 4.4 install, I will begin the migration to CentOS 5 via yum.

Start the upgrade processmkdir /tmp/Upgrades
cd /tmp

Check for centos-yumconf

rpm -qi centos-yumconf

* If centos-yumconf exist, remove it.

* NOTE this seems to be only installed if you installed from the x86_64 version of the ServerCD 4.4 ISO.

rpm -e centos-yumconf

Installing needed RPMS manually

I used wget to acquire the RPMS.

Install centos-release-5-0.0.el5.centos.2.x86_64.rpm centos-release-notes-5.0.0-2.x86_64.rpm

rpm -Uvh centos-release-5-0.0.el5.centos.2.x86_64.rpm centos-release-notes-5.0.0-2.x86_64.rpm

# Make sure you disable all other repos and only have CentOS Base and Updates repositories enabled.

Install the CentOS 5 GPG Key

# Get the GPG key from a mirror or CentOS 5 media.

rpm –import
cd /tmp/Upgrades

Download the following RPMS

# This gets the new yum/rpm working.

  • rpm-libs-4.4.2-37.el5.x86_64.rpm

  • rpm-4.4.2-37.el5.x86_64.rpm

  • yum-3.0.5-1.el5.centos.2.noarch.rpm

  • rpm-python-4.4.2-37.el5.x86_64.rpm

  • popt-1.10.2-37.el5.x86_64.rpm

  • glibc-2.5-12.x86_64.rpm

  • glibc-common-2.5-12.x86_64.rpm

  • beecrypt-4.1.2-10.1.1.x86_64.rpm

  • glibc-headers-2.5-12.x86_64.rpm

  • glibc-devel-2.5-12.x86_64.rpm

  • binutils-

  • elfutils-libelf-0.125-3.el5.x86_64.rpm

  • elfutils-0.125-3.el5.x86_64.rpm

  • elfutils-libs-0.125-3.el5.x86_64.rpm

  • beecrypt-python-4.1.2-10.1.1.x86_64.rpm

  • python-2.4.3-19.el5.x86_64.rpm

  • python-devel-2.4.3-19.el5.x86_64.rpm

  • python-elementtree-1.2.6-5.x86_64.rpm

  • python-sqlite-1.1.7-1.2.1.x86_64.rpm

  • python-urlgrabber-3.1.0-2.noarch.rpm

  • neon-0.25.5-5.1.x86_64.rpm

  • libxml2-2.6.26-2.1.2.x86_64.rpm

  • libxml2-python-2.6.26-2.1.2.x86_64.rpm

  • db4-4.3.29-9.fc6.x86_64.rpm

  • libselinux-1.33.4-2.el5.x86_64.rpm

  • libsepol-1.15.2-1.el5.x86_64.rpm

  • mcstrans-0.1.10-1.el5.x86_64.rpm

  • m2crypto-0.16-6.el5.1.x86_64.rpm

  • krb5-libs-1.5-17.x86_64.rpm

  • openssl-0.9.8b-8.3.el5.x86_64.rpm

  • readline-5.1-1.1.x86_64.rpm

# Install above RPMS

rpm -Uvh *.rpm –nodeps

# Clean and rebuild rpmdb for CentoS 5

rm -f /var/lib/rpm/__*
rpm –rebuilddb

# Clean yum files

yum clean all

# Remove deps/outdated packages

Note: You can run yum upgrade to help find deps that you need to remove.

rpm -e VFlib2 caching-nameserver autofs kudzu pcmcia-cs xorg-x11 newt-perl hal crypto-utils –nodeps

Install new CentOS 5 kernel

# If you are getting the new kernel via wget you need to do the following first.

yum upgrade wget
rpm -ivh kernel-2.6.18-8.el5.x86_64.rpm –nodeps

Remove old CentOS 4 kernel(s)

rpm -qa | grep kernel

remove 2.6.9 bits

rpm -e kernel-2.6.9-42.EL kernel-devel-2.6.9-42.EL kernel-doc-2.6.9-42.EL

Upgrade the system to CentOS 5

yum upgrade

# Install removed packages that were not reinstalled

yum install caching-nameserver autofs

  • cd /tmp

# Generate list of RPMS on the system after upgrade to see what old RPMS are left

rpm -qa >Upgrade_RPM_List

# Reboot system


# Login and you should be on CentOS 5

uname -a

  • Linux localhost.localdomain 2.6.18-8.1.1.el5 #1 SMP Mon Apr 9 09:43:24 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

At this point you will need to start upgrading any extra/third party RPMS.



16 − 6 =