Page 1 of 3 123 LastLast
Results 1 to 25 of 62
  1. #1
    Join Date
    Apr 2001
    Posts
    2,611

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

    What is CentOS?: CentOS is essentially a rebuild of the RHEL source code. I've been using this OS for a couple weeks now with no issues running cpanel.
    More info on CentOS can be found on the web site:
    http://www.centos.org

    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
    Last edited by anon-e-mouse; 05-28-2004 at 08:36 PM.

  2. #2
    its little hard to do thast i think

  3. #3
    Join Date
    Apr 2001
    Posts
    2,611
    Its fairly straight forward actually, what are you stuck on?

  4. #4
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    yes looks very stright forword
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  5. #5
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    [root@opium root]# uname -r
    2.4.21-15.EL.c0
    [root@opium root]# cat /etc/*release*
    CentOS release 3.1 (final)
    [root@opium root]#


    Here's a direct admin box upgraded from rh9
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  6. #6
    Join Date
    Apr 2001
    Posts
    2,611
    thnx TLG for testing that out.. ur a legend!!

    And just incase, cuz i've had a couple people have this issue now, if the EL kernel doesn't install ( rpm -qa | grep kernel <- to check + cat grub.conf ; else lilo.conf ), make sure you download the rpm and rpm -ivh kernelfilename.rpm and modify your boot loader ( be it lilo or grub ) before you reboot! The rpm can be found on any of the CentOS mirrors.

  7. #7
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    The upgrade seems very stable. On a side note, it does not break anything with directadmin. I did not have to fix anything. I did however have to add a few http related thing to the skiplist and webalizer.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  8. #8

    *

    Originally posted by thelinuxguy
    The upgrade seems very stable. On a side note, it does not break anything with directadmin. I did not have to fix anything. I did however have to add a few http related thing to the skiplist and webalizer.
    Man I'm glad I came across this post on google, I wanted the Redhat 3. es and this release does it just as good!

    now to play around with Tomcat and Java

  9. #9
    Join Date
    Feb 2003
    Location
    Potsdam, NY
    Posts
    648
    has anyone tried this on cpanel boxes?

  10. #10
    Join Date
    Apr 2001
    Posts
    2,611
    So far i've done 1 personal production redhat 9 cpanel box no problems. That box also had ircd's and eggdrops on it. No reported problems.

    I've been in contact with others that have successfully migrated their cpanel rh9 to centos via this howto as well with no issues.

  11. #11
    A good yum.conf for the USA

    [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://caos.nplus1.net/centos-3/3.1/os/i386/
    gpgcheck=1

    #released updates
    [update]
    name=CentOS-$releasever - Updates
    baseurl=http://caos.nplus1.net/centos-3/3.1/updates/i386/
    gpgcheck=1

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

    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=http://caos.nplus1.net/centos-3/3.1/extras/i386/
    gpgcheck=1
    Taken from myCPAdmin.com
    Linux/cPanel How-To's - cPanelPlanet.com

  12. #12
    Join Date
    Dec 2002
    Location
    Amsterdam/Rotterdam, NL
    Posts
    2,135
    Would this work for Fedora to Centos too?

  13. #13
    Join Date
    Apr 2001
    Posts
    2,611
    Simple Answer: No! This how-to will not work with fedora as it is much newer than centos 3.1.

    As fedora has newer technologies ( newer gcc, kernel, etc ) this would be a very trickey transition. In essence, you will be *downgrading* the box. I have not had the chance to test this as we only use 1 fedora box that we are migrating clients to a brand new box shortly, thus I have not personally had the need to do so.

    Complicated answer: I know it has been done, but just what needs to be done to enable a smooth transition I am unsure of. You may want to contact thelinuxguy on these boards or through his web site: http://www.rack911.com as I am sure he's told me he has done it with success.

  14. #14
    Join Date
    Dec 2002
    Location
    Amsterdam/Rotterdam, NL
    Posts
    2,135
    Hm that's too bad. The reason that I wanted to try it is that CentOS is much less of a beta product than Fedora is. The problem here would be that I'd have to upgrade the OS on about 50 machines every time they release a new version..

  15. #15
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    if i had another test box with me i could make a tutorial probably.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  16. #16
    Join Date
    Jul 2001
    Location
    Singapore
    Posts
    1,889
    Haze, did you try with:
    Code:
    installonlypkgs=kernel*
    Instead of:
    Code:
    installonlypkgs=kernel kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported
    I tried the wildcard which also works for my test box just FYI and maybe others can try :p

  17. #17
    Join Date
    Apr 2001
    Posts
    2,611
    Choon,

    That'd probably work just fine, infact, i see no reason why it wouldn't. I just basically used a default config that was either provided by yum-conf rpm or was modified by one of cpanels checkyum or safeyum scripts. At the time, since its a rather big transition, i just thought it'd be better to be safe than sorry.

  18. #18
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland, Australia
    Posts
    550
    Hi,

    I was following the instructions and the following came up:

    .....Unable to satisfy dependencies
    Package mod_python needs httpd >= 2.0.40, this is not available.
    Package mod_python needs httpd-mmn = 20020903, this is not available.
    Package mod_ssl needs httpd = 2.0.46-32.ent.3.centos.1, this is not available.
    Package mod_ssl needs httpd-mmn = 20020903, this is not available.

    I am guessing i will need to update apache to 2.0.46 and higher for this CentOS configuration to work.

    Is that correct?

  19. #19
    Join Date
    Apr 2001
    Posts
    2,611
    Hrm.. is there any perticular reason you have those modules installed in the first place ?

    Also, are you using apache from source or from rpm ? If you build apache from source, generally, you build modules from source anyways is why I ask.

  20. #20
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland, Australia
    Posts
    550
    This server is a stock cpanel server. So those modules are what came with the server when i took over it.

  21. #21
    Join Date
    Apr 2001
    Posts
    2,611
    Well.. if you don't need them, why have them installed? Its wise to ensure you don't have anything installed you don't need. Especially with a new server and even moreso if you've been handed a server from someone else. A lot of linux distro's install a lot of programs that you will find useless especially with cpanel installed. So, seeing as your doing such a large move, you'd be best of to sort through what rpms you have installed and what you don't need. That way your upgrade will be a hell of a lot faster and less prone to problems such as you have already experienced.

  22. #22
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    just rpm -e all the dependencys and continue installing.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  23. #23
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland, Australia
    Posts
    550
    Thanks thelinuxguy,

    Thanks all for this great howto and guidance. It was so easy to do. It worked without a hitch. Just need to test it.

    Thanks again.

  24. #24
    Join Date
    Dec 2002
    Location
    Amsterdam/Rotterdam, NL
    Posts
    2,135
    Just make sure not to rpm -e perl (it came up as a dependency once for me), so I removed it, but that messed up the whole yum script ofcourse..

    Instead of rpm -e mod_python you could also add it to the exclude list..

  25. #25
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    Adding it to the exclude list is not a good idea, it wont be updated and you could have a vulnerable version installed.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •