Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have many servers running CentOS 5.* and CentOS 6.*, I would like to update them, but there's some applications running and I might crash these applications, which led me to write this post with this worry in mind.

What you guys recommend me to do it ?

share|improve this question

closed as not constructive by Scott Pack, Sven, growse, MDMarra, Greg Askew Apr 30 '13 at 22:47

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

6  
Have a test environment. –  ceejayoz Apr 30 '13 at 16:51

4 Answers 4

up vote 1 down vote accepted

What you should be aiming for is:

  • Have an automated way to build/rebuild your machines

  • Use that to build an identical a test environment (usually VMs)

  • Have an automated set of tests that ensures a machine is doing what it is meant to be doing

  • Run that automated test on the test environment before and after the upgrades, and then again before and after the real environment upgrades.

This all hinges on being able to quickly and automatically build your machines, which is where puppet / chef and similar step in. We use vagrant & virtualbox for the test environment, which also allows you to safely write new puppet / chef code and test that too.

You know when your automation is "enough" when your tests pass for a new machine that was previously a fresh install, preferably with no user intervention.

Oh, and for critical systems, use a failover pair and update the passive node first (then failover, and if your tests pass, update the previously active node).

share|improve this answer
    
thank you for you answer –  Valter Silva May 6 '13 at 21:05

and I might crash these applications

1) One of the main reasons for using a well established distro - and particularly Centos (as essentially a copy of RHEL - a snapshot rather than a rolling release) is that any updates will retain backward compatability - the updates are unlikely break anything

2) If bits of code stored on disk are replaced with something which is incompatible, then there shouldn't be any impact until you try to load and run the new code - very few bits of software will perform any dynamic linking deferred after start up - hence the programs might not restart, but it's highly improbable that they will crash.

3) If there is any possibility of these systems being accessed remotely (or even locally with any possibility of malicious intent) you*must* keep your patches up to date.

4) in the case of kernel patches you must reboot the machine after applying the patch - i.e. your currently running code is going to be stopped

5) if you've got "lots of machines" and they are doing anything of value then you should have the capacity to test the updates on a non-mission critical system yourself (as vonbrand points out, you don't even need a dedicated machine for this).

share|improve this answer

Try the updates on a spare box (or a virtual machine) with the applications you have running. Define a battery of tests beforehand, run them against the installed versions and save the results for comparison.

With yum list installed you can see what packages are installed, rpm -Va will give you a list of packages rpm thinks have been modified (for some strange reason it gives many false positives), check what configuration files have been changed, note the changes and save them. Look for other, external configuration and local modifications. Make sure you can rebuild an exact copy if required.

Set up kickstart files for each of the machines, keeping them up to date will make future migrations (or moving a machine in case of failure, or creating a mirror for spikes of activity, or...) much simpler.

share|improve this answer

Before run update you should confirm that your running applications will compatible with updated version and then you can update all packages with yum.

List down all the packages with ‘yum list updates‘ command. So, you would get the better idea which packages are going to install. and run update command

yum update

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.