HOW-TO: yum upgrade; redhat 9 -> CentOS 3.1

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
Here are the steps i took to update a Redhat 9 box running on a minimal install ( no X, etc ) as suitable for a server to CentOS 3.1 ( which is a fork of RedHat Enterprise Linux v3 )..

I took a fresh install of redhat 9, slapped it on a test box then updated it with up2date. I then installed yum for redhat 9 which can be found here:
Yum Download

Now, you might want to rebuild the rpm database, just incase, thats up to you:
# rpm -vv --rebuilddb

I then modified /etc/yum.conf to look like this:

Code:
[main]
exclude=httpd* mysql* php* perl*
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
installonlypkgs=kernel kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported
tolerant=1
exactarch=1

[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.pacific.net.au/linux/cAos/centos-3/3.1/os/i386/
gpgcheck=1

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.pacific.net.au/linux/cAos/centos-3/3.1/updates/i386/
gpgcheck=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirror.pacific.net.au/linux/cAos/centos-3/3.1/addons/i386/
gpgcheck=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirror.pacific.net.au/linux/cAos/centos-3/3.1/extras/i386/
gpgcheck=1
Change "http://mirror.pacific.net.au" to a mirror near you, a list can be found here:
CentOS Mirrors

After that you need to import the GPG key for the centos RPMs. Issue the following command:
# rpm --import http://mirror.centos.org/centos/3.1/i386/RPM-GPG-KEY-CentOS-3

Nows the time you want to check you have made appropriate backups, etc ( i hope you all test this out before rolling production servers! ).

Next step is to run the following command:
# yum upgrade

This will download the rpm headers and determine what needs to be done, play carefull attention of course here and in all parts if this process for errors. Yum will then ask you if you are sure you want to go ahead, if no errors are present, press "y" then "enter".

This process will take a while, depending on your connection and the gear your installing it on of course. Go brew a fresh pot of coffee, order a pizza, grab a movie or GET BACK TO WORK YOU!!!!

After thats done, check for errors, make sure the new kernel is installed by issueing:
# rpm -qa|grep kernel

You should be presented with a kernel versioned like this: 2.4.21-15.EL.c0 as well as your other kernels previously installed. Check your boot loader to make sure the new kernel is default.

Finally run:
# yum update

Just to ensure you have everything you need.

Now your set to reboot ( hopefully ):
shutdown -rf now

This worked like a charm for me, hope you all can make use of this somehow :)
 

rich98764

Active Member
Aug 3, 2003
27
0
151
Well I went and tested this myself, also.

Clean RH9 server and installed cPanel.

didnt run an up2date, just went ahead and started the upgrade.

a few small things I ran into and wish to add.

after running yum upgrade i had some weird dependancy issues with mod_perl and something with httpd2... most likely something rh9 installed by default, so i removed the packages and went on with the yum upgrade and it went well.

when done I went to check to make sure the kernel installed.. to my surprise it didn't

so simply doing a yum install kernel brought that up.... rebooted and im in...

still testing to make sure cpanel is working correctly etc, but so far so good :)
 

sHORTYWZ

Well-Known Member
Dec 14, 2003
49
1
156
I'm looking at doing this on one of my boxes.. any particular reason to go 3.1 versus the newer versions?
 

Snowman30

Well-Known Member
PartnerNOC
Apr 7, 2002
679
0
316
cPanel Access Level
DataCenter Provider
Will this work to upgrade a RH 9 box to Centos 3.5??

Ive got a live populated box and would mind upgrading it to centos but i want to make sure it wont cause any issues first...
 

Blapto

Active Member
May 13, 2005
36
0
156
I'd just like to add:
Don't do this just for the sake of it. Unless there is a new feature you need/want, there's really no point.
If you need a new good kernel I suggest openwall.
 

rsutc

Well-Known Member
Oct 8, 2002
84
0
156
drupal said:
Does anyone know if this would work for RH8?
fwwebs said:
Yes it will.
Now just to be clear, my DC is recommending I go to CentOS 4.1 from RH8. OK, I guess it's time. Has anybody done these steps in this circumstance and either had it work or fail? Any problems to look out for?

The DC wants to nuke the drive, do the OS and cPanel install, then turn it over to me to restore all the accounts from the second drive. This live update, if I were confident of it working, seems like it could be superior.

Any comments on my situation?

Rick
 

sHORTYWZ

Well-Known Member
Dec 14, 2003
49
1
156
Going to CentOS 4.x pretty much requires a reimage to get the full effect to my understanding. What your DC is recommending would be the best course of action in my opinion..

Although on these forums I'm sure my opinion will be trumped in about 3 minutes.