Yum Install CentOS-5 (Upgrade from CentOS 4 to CentOS 5)

Don’t follow any how-to without having your brain in alarm mode.

I found a nice tutorial (http://www.tocpcs.com/yum-install-centos-5-upgrade-from-centos-44-to-centos-5/) from 2007 for the upgrade from CentOS4 to CentOS5  using yum only – which I tried to use and did NOT follow to the end – otherwise my server, standing in a datacenter 150 km away, would have been wiped out.

First of all: This is not for the unexperienced and I don’t take any responsibilities for your data!

So here is the tutorial for the fearless, double checked and proven:

1. First things first: Tell the system that your core is CentOS 5 (which is not right yet, but that way you will get the right packages):

rpm -Uvh http://ftp.tudelft.nl/centos.org/5/os/i386/CentOS/centos-release-5-5.el5.centos.i386.rpm http://ftp.tudelft.nl/centos.org/5/os/i386/CentOS/centos-release-notes-5.5-0.i386.rpm

2. clean up yum’s cache

yum clean all

2a. check that all 3rd party yum repositories (atomic, rpmforge…) are disabled!!! Otherwise you will never ever solve the dependencies

3. remove packages, that might be in the way during the upgrade:

rpm -e --nodeps hal

4. clean up your kernels (yes, there might be more than one)

uname -a (find out, which kernel is your operational kernel)

rpm -qa | grep kernel (find all installed kernels)

rpm -e ... (for all kernels but your operational kernel)

rpm -e --justdb --nodeps (for the active kernel)

5. Now it’s time for the first try

yum upgrade

6. …yes, and now you have to wait until your system sorts out your problems. In the end you will get a list of problematic packages. For me it was python-elemnttree which is scary, because it belongs to yum. Remove all packages where you are sure you can miss them (and re-install later):

rpm -e --justdb --nodeps python-elementtree

…and VFlib2, which I really don’t need, so I removed it with all dependencies:

rpm -e VFlib2 ghostscript ghostscript-fonts hpijs system-config-printer hal-cups-utils

7. …and off we go:

yum upgrade

8. Now, it takes time – and in the end my yum was broken 🙂  So here is the fix:

rpm -Uvh --force http://ftp.tudelft.nl/centos.org/5/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm
yum clean all

9. and that’s it. check your grub configuration and reboot, you’re now the proud owner of CentOS5

10. like to clean up a bit more?

rpm -qa | grep el4

11. all those packages can either be removed or – when you got them from a sneaky RPM mirror with newer versions – downgraded.

just for the record: I found the following on my system:


…and this is, what I did:

rpm -e up2date rhnlib mysql-libs php-pecl-zip ash
yum downgrade perl-DBI perl-DBD-MySQL php-pear dmraid

finally I brought the RPM-database into a consistent state. Not needed, but sometimes helpful

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

And that’s definetly it!

enjoy, it worked for me 4 times on different servers!

Das könnte dich auch interessieren …

Eine Antwort

  1. Blaine Squeo sagt:

    Thanks for this usefull information.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.