Find the answer to your Linux question:
Results 1 to 7 of 7
Hi all. I am fairly new to Linux admin. I am the server administrator for a college library, and I need to upgrade CentOS on our web server. I upgraded ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    1

    CentOS upgrade from 4.7 to 5.3


    Hi all. I am fairly new to Linux admin. I am the server administrator for a college library, and I need to upgrade CentOS on our web server. I upgraded CentOS on the mirror server from 5.0 to 5.3 with yum upgrade. But I am unsure if I should use yum upgrade or yum update to go from 4.7 to 5.3. Any advise? Thanks.

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    Hi SMHarris,

    It's generally not a good idea to upgrade from one major release to another, although it is possible you do so at your own risk.

    Your best bet is to backup the system you want to upgrade, do a fresh install of the new release and then restore the data / configuration that you want from the old system.
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,452
    Quote Originally Posted by SMHarris View Post
    Hi all. I am fairly new to Linux admin. I am the server administrator for a college library, and I need to upgrade CentOS on our web server. I upgraded CentOS on the mirror server from 5.0 to 5.3 with yum upgrade. But I am unsure if I should use yum upgrade or yum update to go from 4.7 to 5.3. Any advise? Thanks.
    There are significant differences between the 4.x and 5.x distributions. As matonb said, back everything up before you upgrade. It is also safer if your /home directory (where all the users live) is on a separate disc or partition. In any case, in this sort of situation, I do an entire image copy of the system disc(s) to an external drive. You can use the 'dd' or 'cat' commands to do that. Also, burn a live/recovery CD so you can restore the external image if necessary.

    So, what I do in these situations is as follows:

    1. Burn liveCD
    2. Boot liveCD
    3. Make backup image copy of the system disc(s) to an external drive (inline gzip compression of a 160GB disc takes about 90 minutes to a USB 2.0 drive, and half that or less to an esata drive). I suggest doing inline gzip compression of the data because it greatly reduces the amount of data going to the external disc, which is the main time consumer of this operation. It also means that your external drive will need less space (about 1/2 of the source drive) for storage of the image.
    4. Reboot back to original OS
    5. Run "yum upgrade" to update the system. The upgrade option is the same as "yum --obsoletes update"
    6. Test custom software. Some of it may well have to be recompiled or relinked. You should probably check for source code availability before you upgrade the system, just in case as our friend Murphy assures us that something will break!

    One final bit of advice - you should probably run the upgrade, etc. in single-user mode so that remote users cannot get into the system during the process.

    Good luck, and let us know how it goes.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I would suggest you to create an .iso image of existing system before doing upgrade. You can do that easily using PartImage.
    As other mentioned earlier, upgrading from 4x to 5x is a bit risky. Things might break and in that case you can re-install .iso image of 4x using easily.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,452
    Quote Originally Posted by devils casper View Post
    I would suggest you to create an .iso image of existing system before doing upgrade. You can do that easily using PartImage.
    As other mentioned earlier, upgrading from 4x to 5x is a bit risky. Things might break and in that case you can re-install .iso image of 4x using easily.
    You really don't need an ISO image. Just the output from dd or cat of the root device will work just fine. That is what I do (along with compressing it) and I have used that technique to restore or clone system images many times without any problem whatsoever. Remember the KISS principal!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I have 30+ machines in my Lab and .iso image of a completely configured and updated system make things easy for me to install the same in other machines.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,452
    Quote Originally Posted by devils casper View Post
    I have 30+ machines in my Lab and .iso image of a completely configured and updated system make things easy for me to install the same in other machines.
    You REALLY do NOT want to do that - upgrade them all from an already updated image. There are a lot of things that are specific to each system that cannot be duplicated across the board, such as IP addresses, routing tables, device id's, etc. What you do want to do is create a bit-image copy of each system disc in case of disaster so you can easily restore it. Whether it is an iso or a gz file doesn't matter. It is going to be on an external drive that you can connect to each machine. FWIW, an iso file is typically NOT a bit image, but a copy of the file system. I mean that you need to make a bit copy of the ENTIRE disc, including partition table and boot loader. This is absolutely necessary, IMO. After over 25 years doing this sort of stuff, failure to account for our friend Murphy has cost me many sleepless nights in the lab. Doing the bit-image copy has saved my bacon many times.

    After you do the image copy, then do the update on each using the system update utilities (yum, rpm, apt-get, yast, etc depending upon the distribution). Since a lot of network bandwidth will be chewed up downloading the updates to each system, you can download the repositories needed to a local system and/or disc and point your systems to that system for their updates. That should speed things up quite a bit since you won't have to go outside the LAN for that.

    Whatever you do, plan it out in detail, written down and reviewed by as many stakeholders as possible. People may ask some dumb questions, but usually you'll hear something that is important to take into account. A 30+ system migration is a big job and no detail is too small to overlook. Remember, Murphy owns you!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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