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.

Centos 3.4 --> Centos 4 ?

Discussion in 'General Discussion' started by Ramsy, May 15, 2005.

  1. Ramsy

    Ramsy Guest

    Anybody has a how-to on how to upgrade from centos 3.4 to centos 4, and any do's and dont's for the progress ?
    Can this be done remotely or do i need to go to the DC in order to migrate ?
     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    This really isn't even worth doing at this point since you can't use selinux with cPanel.
     
  3. Ramsy

    Ramsy Guest

    Well CPanel supports it now (look @ cpanel.net frontpage) and i hear it's less resource hogless and more stable then 3.4, so i wanna give it a shot if it were that simple as the 3.3 --> 3.4 upgrade, altho i can't find any good how-to's on google.
    Centos site says use "linux upgradeany" directly from CD, but i wanna know if somebody did it remotely with success :)
     
  4. Webjunkie

    Webjunkie Active Member
    PartnerNOC

    Joined:
    May 1, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Use at your own risk, and YMMV!

    # rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
    # rpm -Uvh ftp://sunsite.utk.edu/pub/linux/caos/centos/4.0/os/i386/CentOS/RPMS/centos-release-4-0.1.i386.rpm
    # yum install glibc glibc-common
    # yum install {kernel|kernel-smp} *(if this give you errors installing lvm2 read the note at the end of the post)
    # rpm -e kernel-smp-2.4.21-27.0.2.EL (the release number may vary depending on your system)
    # yum upgrade

    conflict between udev and kernel

    # rpm -qa|grep kernel
    # rpm -e kernel-2.4-whatever

    Also remember before rebooting to view the new kernel's initrd image size and generate a new one to compare.

    # ls -l initrd-2.6.9-5.0.3.ELsmp.img
    -rw-r--r-- 1 root root 195325 Mar 2 16:09 initrd-2.6.9-5.0.3.ELsmp.img

    # mkinitrd initrd-2.6.9-5.0.3.ELsmp.img.new 2.6.9-5.0.3.ELsmp

    # ls -l initrd-2.6.9-5.0.3.ELsmp.img.new
    -rw-r--r-- 1 root root 474840 Mar 3 11:39 initrd-2.6.9-5.0.3.ELsmp.img.new

    If this differs in size, like mines, move the old image to a different file name and cut off the '.new' extension in the new one's filename

    # mv initrd-2.6.9-5.0.3.ELsmp.img initrd-2.6.9-5.0.3.ELsmp.img.dist
    # mv initrd-2.6.9-5.0.3.ELsmp.img.new initrd-2.6.9-5.0.3.ELsmp.img

    You need this in order to permit grub loading the new initrd (or change the grub.conf to point to the new generated initrd image, make your choice).

    As you see the rpm generated initrd is smaller than the manually generated, which means there's something wrong in the rpm postinstall script. Make sure of this and take a lot of care before rebooting (otherwise be ready with a rescue CD to boot and follow the above procedure).

    P.S.: you may have need of cutting the "smp" letters in the kernel name, depending on your hardware configuration.

    I forgot to mention some important changes between 3.4 and 4.0 release. One of most important is the name changing of some packages, like rpmdb. On CentOS 3.4 that package has the name "rpmdb-redhat" while in 4.0 it has "rpmdb-CentOS". There's now way to upgrade it since it's a totally different name and the package install paths are different by the old one.

    Just install the new rpmdb-CentOS through Yum or simply downloading it and installing with rpm -ivh, then remove with rpm -e the old rpmdb-redhat.

    *NOTE: Possible errors installing lvm2 package
    ==============================
    Yum may give errors trying to install the lvm2 package, since lvm1 is already installed and files may go to be conflicting (I had this issue only on two systems, the third worked perfectly, don't ask me why). The only solution I found is to manually install the downloaded rpms located in the /var/cache/yum/base/packages directory, just remember to use the --replacefiles switch to install lvm2, and later erase lvm1, like described below:

    # cd /var/cache/yum/base/packages
    # rpm -Uvh --replacefiles lvm2*.rpm (and some dependencies must follow)
     
  5. Webjunkie

    Webjunkie Active Member
    PartnerNOC

    Joined:
    May 1, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Please keep in mind that it is very easy to make your system unbootable if you do not follow these instructions exactly or forget to do something mentioned.

    Also, if the system is rebooted at any point during this process, you will find yourself with an unbootable system.

    After everything is done, you will need to reboot in order to complete the upgrade.
     
  6. Ramsy

    Ramsy Guest

    thanks a bunch m8 :D
    did this work for you ?
     
  7. Webjunkie

    Webjunkie Active Member
    PartnerNOC

    Joined:
    May 1, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Yes, we've done it several times with success.

    After doing everything and rebooting, make sure you run

    # /scripts/upcp --force

    To make sure Cpanel is good to go.

    You may also have to download and run

    # sh buildapache.sea

    because the upgrade sometimes makes Apache unusable.
     
  8. Ramsy

    Ramsy Guest

    I that the only thing i need to do ?
    Or are there more ?
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I'd strongly suggest you read the information and FAQ on the CentOS site:
    http://www.centos.org/modules/smartfaq/faq.php?faqid=27

    As Webjunkie said, you risk making your server unbootable, so I'd suggest you only do it on a server you can afford to have to lose any data on and have an OS restore done on. It would seem much more secure to backup, load CentOS4 then reload, but each to their own ;)
     
  10. Ramsy

    Ramsy Guest

    Hmm, it actually worked.
    Just needed to copy the old named.conf that was all.
    Worked without any problems.
    Tested it first on a testbox, and must say ta for the howto webjunkie!
    Cheers!
    :D
     
  11. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Ramsy - how long did the upgrade take you and on what spec machine?

    If I'm ever going to consider a live upgrade it would be good to know how long things are likely to take.
     
  12. Ramsy

    Ramsy Guest

    It is and AMD 2ghz, with 1GB RAM, 1x 120 and 1x 160 HDD.
    It was running Centos 3.3 when i installed it the first time, then a few months ago i upgraded to Centos 3.4.
    And todat i upgraded it to Centos 4.

    Currently running:
    WHM 10.1.0 cPanel 10.2.0-R82
    CentOS 4.0 i686 - WHM X v3.1.0

    I just followed Webjunkies intructions and that worked for me.
    I only needed to remove imap and omni-foomatic and foomatic package, which was giving me problems.
    Mysql didnt work after the reboot, so i did a upcp --force, mysqlup --force and copied old named.conf over the new one and worked like a charm.
    The whole process took me 2 hrs tops.
     
  13. Secret Agent

    Secret Agent Guest

    I followed this to upgade from 3.4 to 4.1:

    rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
    rpm -Uvh http://mirrors.versaweb.net/centos/4.1/os/i386/CentOS/RPMS/centos-release-4-1.2.i386.rpm
    yum install glibc glibc-common
    yum install {kernel|kernel-smp} *(if this give you errors installing lvm2 read the note at the end of the post)
    rpm -e kernel-smp-2.4.21-27.0.2.EL (the release number may vary depending on your system)
    yum upgrade


    I got this error during this step yum install glibc glibc-common

    IOError - # 2 - No such file or directory


    What should I do?
     
  14. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    You're in uncharted territory. If you don't know what to do, you should probably have waited for others to clear the way first. Good luck, though.
     
  15. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
  16. brentp

    brentp Well-Known Member

    Joined:
    Mar 11, 2004
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ayr, North Queensland, Australia
    I highly suggest that you use rack911.com for this. Their pricing is $50 a box and their upgrade is flawless (even on my screwed over box) ;). They upgrade it in stages and get the main stuff out of the way and then they do the upgrade. As i said before. Flawless.

    I just did an upgrade before from 3.5 - 4 and it worked flawlessly. However, DO NOT UPGRADE TO 4.1, as i do not know if cPanel works on it yet (and im not game to test it). One of the major changes between 3 and 4 is the change from 'devfs' to udev as devfs was obsoleted by udev. And if you do try to migrate to 4 and realise you fucked it over, dont try 'downgrading' to 3 by installing all the 3.x rpms again. It wont work.

    Regards,
    Brent
     
  17. 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
    cPanel will work with 4.1, 4.1 is only a respin of all the updates in 4.0 up to where RHEL released v4 U1.
     
  18. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    There seems to be a fair amount of interest in upgrading CentOS 3.4/3.5 to 4.0/4.1.

    Can anyone explain what the benefits of doing so are? Are there any real noticeable benefits aside from the "it's newer, it must be better" line of thought?
     
  19. erwinfa

    erwinfa Well-Known Member

    Joined:
    Jun 14, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    0
    I'm using Centos 4.1 at one of my box without a problem

     
  20. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    I'm not so sure about this, I asked rack911 to migrate my RHE 3 to Centos 3.4 about a month ago. They answered very fast and I sent them my login details. As agreed, they started with the migration but they told me, that there is a problem with the kernel, so I'm using now Centos 3.4 with the RHE kernel. They promissed me to fix this later, but since there, I'm not able to get any status from them. I sent email, replyed to the ticket in their helpdesk system, but no answer anymore.

    How do you comunicate with them?

    Michael
     
Loading...

Share This Page