The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by haze, May 25, 2004.

  1. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    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 :)
     
  2. rich98764

    rich98764 Active Member

    Joined:
    Aug 3, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    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 :)
     
  3. prodigy

    prodigy Member

    Joined:
    Dec 16, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Works like a dream, well done mate.
     
  4. drupal

    drupal Active Member

    Joined:
    Jun 23, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Not here, but there.
    Does anyone know if this would work for RH8?
     
  5. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
    Yes it will.
     
  6. drupal

    drupal Active Member

    Joined:
    Jun 23, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Not here, but there.
    Very cool! Thanks.
     
  7. sHORTYWZ

    sHORTYWZ Well-Known Member

    Joined:
    Dec 14, 2003
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    I'm looking at doing this on one of my boxes.. any particular reason to go 3.1 versus the newer versions?
     
  8. brentp

    brentp Well-Known Member

    Joined:
    Mar 11, 2004
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ayr, North Queensland, Australia
    because the post is outdated :). Btw; dont try going to 4.0...

    Regards,
    Brent
     
  9. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    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...
     
  10. brown

    brown Member

    Joined:
    Apr 21, 2002
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    How can this be done for a Fedora 2 box to Centos 3.5??
     
  11. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    Fedora Core 2 is much newer than CentOS 3.5 and should not even be attempted as it will definitely break certain things.

    Regards,
    Alan
     
  12. Blapto

    Blapto Active Member

    Joined:
    May 13, 2005
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  13. rsutc

    rsutc Well-Known Member

    Joined:
    Oct 8, 2002
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
     
  14. sHORTYWZ

    sHORTYWZ Well-Known Member

    Joined:
    Dec 14, 2003
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
Loading...

Share This Page