LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Upgrading CentOS 5.2 (https://www.linuxquestions.org/questions/linux-newbie-8/upgrading-centos-5-2-a-4175437529/)

Footsie 11-17-2012 12:54 AM

Upgrading CentOS 5.2
 
I want to upgrade CentOS 5.2 to as close as I can get to the current version. I've never done this sort of thing before.

Is it enough just to type

# yum update

and then reboot?

Am I likely to hit problems that will make me wish I'd never done it?

Will that just upgrade to CentOS 5.8? What would I have to do to upgrade to CentOS 6.x?

rajkumar.m 11-17-2012 03:07 AM

Hello Footsie,

Fire the command #cat /etc/grub.conf and check the current kernel version.Then give below command

#yum update -y

The above command will upgrade your CentOS from CentOS5.2 to CentOS5.8. Centos 5.8 is the last version in Centos5.X series.

Once the yum update command is completed you will get a new updated kernel. You can verify it in the below file

#cat /etc/grub.conf


If you install Centos5.X series OS you cannot upgrade it to CentOS 6.X series. If you install Centos 6.1 you can upgrade it latest version of Centos 6.X.

Note:
-----

1. Centos 6.X series is not recommended in production environment. It is giving plenty of problems don't use it.




Thanks
Rajkumar.M
For Linux related Technical Study check out the below link
www.thetechnicalstuff.com

snowday 11-17-2012 07:56 AM

Quote:

Originally Posted by Footsie (Post 4831189)
I want to upgrade CentOS 5.2 to as close as I can get to the current version. I've never done this sort of thing before.

Is it enough just to type

# yum update

and then reboot?

Am I likely to hit problems that will make me wish I'd never done it?

Will that just upgrade to CentOS 5.8? What would I have to do to upgrade to CentOS 6.x?

That sounds like a good plan to take you up to CentOS 5.8.

CentOS is based on Red Hat, which is designed for a production environment, so updates are generally safe & trusted. If you have mission-critical customized scripts/applications then it is sensible to test if/how they will be affected by the upgrades, on a spare machine.

Footsie 11-17-2012 09:10 AM

Thanks a lot for your help, folks. It is a production server so I'll take your advice and upgrade to 5.8. Will a reboot be necessary? I presume it will.

I'm a bit nervous about rebooting since last time I restarted one of the services that had been running without problems for years, it stopped working!

Thank you.

John VV 11-17-2012 07:20 PM

however the major version of mysql in 5.8 will be the same as in 5.2
and you wanted a newer version of mysql

install CentOS 6.3

Footsie 11-18-2012 01:08 AM

John, it would be helpful if you answered the question I asked, not the one you think I ought to have asked.

It appears, from the far more helpful comment from rajkumar, that version 6 causes problems in a production environment. Do you have any reason to think otherwise?

All I've had from you on this site is frothing at the mouth indignation that I would dare to even contemplate doing - well, anything at all really. How could I dream of wanting mysql version 5.1? What am I thinking?

As for useful instructions, there have been none.

Elv13 11-18-2012 01:52 AM

The 6.* series had a lot of time to mature. I would recommend it over 5.*. The 5.* series is already more than half a decade old, planning a migration is becoming something that you have to care about. As said earlier, upgrading to a newer major version is not a good idea, don't do it. Install from scratch if you want to upgrade further. The 5.* series wont bring software version bump. It is designed to be a stabilized snapshot of some point in time to avoid update pain. As for the reboot, it is preferable, but not necessary. The only change that really require a reboot is the kernel update. All other take effect at runtime. I still suggest you reboot.

Footsie 11-18-2012 04:13 AM

Thanks Elv. It's slightly OT, or at least an addition to the original question, but the thing I really want to do is upgrade mysql to version 5.1 or greater, since something else I want to upgrade requires at least this version.

Do you know of any reason why mysql v5.1 can't be installed on a system running CentOS 5.x?

Many thanks.

snowday 11-18-2012 06:30 AM

Quote:

Originally Posted by Footsie (Post 4831797)
John, it would be helpful if you answered the question I asked, not the one you think I ought to have asked.

It appears, from the far more helpful comment from rajkumar, that version 6 causes problems in a production environment. Do you have any reason to think otherwise?

All I've had from you on this site is frothing at the mouth indignation that I would dare to even contemplate doing - well, anything at all really. How could I dream of wanting mysql version 5.1? What am I thinking?

As for useful instructions, there have been none.

Ignore senior members' advice at your own peril. Check the post count before you are so quick to dismiss...

Elv13 11-18-2012 02:50 PM

Quote:

Originally Posted by Footsie (Post 4831871)
Thanks Elv. It's slightly OT, or at least an addition to the original question, but the thing I really want to do is upgrade mysql to version 5.1 or greater, since something else I want to upgrade requires at least this version.

Do you know of any reason why mysql v5.1 can't be installed on a system running CentOS 5.x?

Many thanks.

Footsie, it is not OT. In this forum we always answer the question and tell you what you have to know to understand your problem. If someone come here with a 1997 version on Linux and think it represent the current state of the OS, we have to tell him it is not, even if it is not directly related to the question. In that case, just as in your, it come to install modern software on older platform.

As I said in the previous post. RHEL/CentOS major versions are snapshot in time. They offer a stabilized version of most software available at the time. In some case, updates will be available in third party repositories. This is the case for newer version of MySQL. _But_, you have to trust third parties. You have to accept that their standard of quality are lower than those of the default package offering. This is not by laziness or lack of knowledge. This is simply the fact that you can't have the latest and greatest _and_ well tested and mature packages at once.

CentOS 5.* is a snapshot in time of 2007. If you want something newer, CentOS 6.* will offer a snapshot in time of 2010. It will come with a newer version of MySQL and had 3 years this month to settle and stabilize. That would be my advice.

_OR_ you can add a new yum repositories that host newer versions and simply "yum upgrade" to update all packages to newer versions. But really, it is time to think about dropping CentOS 5.*, as stable as it is, it remain outdated. You don't want the pain of upgrading in many years. Every seconds you stay with former technologies add to you or your company technological debt. This add up until the cost of maintaining outgrow the cost of migrating. But at that time, those cost are enormous compared to just staying up to date over time. This is not directly your question, but it is closely related to it and a better answer than simply giving you the link to mysql 5.1 RPM package file.

/me IT Engineer with 10 years+ of Linux administration of programming experience, I suggest you don't dismiss what I just said as off topic

Footsie 11-18-2012 10:07 PM

I think you misunderstood me, Elv. I was saying that MY mention of mysql 5.1 was slightly OT in a question about upgrading CentOS, not your answer!

I am happy to do whatever work is necessary and to upgrade to the next major version of CentOS if that's what is required. The only reason I hesitate is that I have no experience of doing it and if anything goes wrong I don't know how long it would take me to fix it. I can't have the site down for more than a few hours.

Also, I don't even know where to begin. I work alone (it's a charity site and I am the DBA, the programmer, the go-to guy if people have difficulties, and everything else. I am the entire IT department!) Perhaps I'm worrying myself unnecessarily. Maybe it will turn out to be five minutes work. I've never done it before, so I don't know.

Please tell me, in the most practical terms, how I can upgrade to CentOS 6.x. Please warn me about any problems I might have in getting a site, based on a LAMP stack, working again after the upgrade. If I'm just being a wimp and it's all perectly simple, you can tell me that too!

I am not thick, just inexperienced and worried about what might happen if anything goes wrong.

Thank you,
Paul

chrism01 11-19-2012 12:33 AM

The rule with Centos is the same as RHEL; you can update 5.x in place, but if you want 6.x you have to start with a fresh install.
RH in fact won't support a system that has been 'upgraded' from one major version to another, for very good reasons.
eg https://access.redhat.com/knowledge/...ted_Notes.html

You should have a backup system anyway for when your current system breaks (and all systems do sooner or later).
Start by copying the current live system to that, then do a 'yum update' and reboot to get the new kernel running and enforce a restart of all services.
You need to be able to do this anyway for breakage scenarios, as above.

Once you've got 5.8 solid, you can start looking into 6.x on the backup box.

For a prod system (which this appears to be) I highly recommend NOT adding unofficial repos unless you REALLY know what you're doing.

Useful links
http://www.linuxtopia.org/online_boo...ion/index.html
http://www.linuxtopia.org/online_boo..._6_deployment/

Footsie 11-19-2012 05:21 AM

I will attempt immediately to magic myself into a land where I have as many servers as I like. If I fail and remain in this world, my circumstances will continue to be that I have only a single server, and only a telnet and sftp connection to it.

Where now?

Thanks.

Elv13 11-19-2012 09:50 AM

You can always use virtualisation. It give you as many server as you want with only one. Try installing CentOS in a virtual machine on your laptop. Make yourself confortable with the process, yum and installing LAMP applications using yum. Once you are confortable with that. Backup your server and do a fresh install. Or better, get your new install ready and swap the hard disks (not very practical if you use complicated RAID setup, but if the server use a single disk or a RAID1 and you have access to it, it's quite easy).

If you can't afford downtime, make sure you try first in a safe environment.

chrism01 11-19-2012 08:26 PM

Like Elv13 said, you just need another env, it doesn't have to be an exact duplicate (usually, unless you have exotic HW).
There's no way to guarantee it won't break if you upgrade the current prod server; that's why you need a test env that's close enough, so that you can practice and and get it down to a known procedure.

In addition I'd like to re-iterate that ALL systems break (either SW or HW) eventually; you must have some sort of Disaster Recovery plan.
If you really know what you're doing, then re-installing from backups is possible, but may take some time. Can the the Charity handle the downtime?
You need to ask them about that.
Otherwise, find a another box you can use for at least a short term whilst you fix the original one.


All times are GMT -5. The time now is 08:11 PM.