Andrea Matesi

Upgrade Centos 4.7 to 5.3.

August 9th, 2009 by amatesi

I’m used to Ubuntu and it’s funny sudo apt-get goodness, but for some reasons now I got involved with Centos administration.

After learning some yum quirks (believe me, it’s easy, if you’re used to apt-get and dpkg), I was given the task to migrate a 32 bit Centos 4.7 Final install to 32 bit Centos 5.3 final.

Some useful yum commands I learned:

  • yum install package
  • yum remove package
  • yum clean all

For the migration task, I was following these guidelines: http://wiki.centos.org/HowTos/MigrationGuide/ServerCD_4.4_to_5

I can confirm it worked, except some expected, minor issues, solved by using some sanity. To manually download my packages, I choose a local italian mirror (the garr mirror – ftp://mi.mirror.garr.it/pub/1/centos/5.3/os/i386/CentOS/).

I’m not in the mood for a step-by-step howto (it’too hot and I’m too busy ATM, just follow the wiki over there…), but here I am sharing some tips, notes and issues I encountered and how I overcame them.

At the section:

- 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

make sure you remove ALL 2.6.9x kernel iterations. To know how many kernel iterations you have, just type 

rpm -qa | grep kernel

then, when launching your rpm -e command, make sure you choose ALL kernel-2.6.9X, kernel-devel-2.6.9x and kernel-doc-2.6.9x instances.

Over time, a server may become full of kernel revisions (down here they were almost 17), so when I launched the remove command, I (wrongly) thought like it was crashy and was tempted to kill it by typing CTRL+C; before doing so, I opened another ssh session and launched "top", there I saw some activity by the rpm command himself, so I decided to leave him do its task and switched doing something else in the meantime; ~20 min. later I was given the prompt back.

 

Another source of concern was when dealing with yum, repos and rpm.I experienced some broken dependencies, some missing libs and some unsatisfied python deps, so I happened to remove the old versions (el4) and installed the new ones.Too bad that, when removing old packages, I ended up on a strange situation: I found myself removing sqlite. Since (probably, not so sure about that), the rpm Db is based on sqlite, I ended up on an inconsistent status, where I couldn’t install nor remove anything(!), not with rpm commands neither with yum, so take care when/if playing with a critical system component like sqlite.

FYI, i’ll post a very useful link, that can help you deal with sqlite and borked rpm db: http://www.raditha.com/blog/archives/001579.html

As always (at least, when dealing with linux…), YMMV: I wish you a happy Centos migration!

References:

  • http://wiki.centos.org/HowTos/MigrationGuide/ServerCD_4.4_to_5
  • http://www.tocpcs.com/yum-install-centos-5-upgrade-from-centos-44-to-centos-5
  • http://www.raditha.com/blog/archives/001579.html
Bookmark and Share

Posted in GNU Linux, System Administrator | No Comments »

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word