I've made a howto for the update. Since the guidelines don't allow external documents, but I already formatted it in my howto site, I'll go mixed, and paste it in here. If you want the original, well, http://confluence.wartungsfenster.de...tinuos+Release
The content is identical as of now but I'd recommend you check both places in case of updates. Or if you need it as pdf, for example.
---- here we go ----
Updating CentOS, forever
Yesterday the CentOS project released the Continuous Release (CR) repo which allows much faster tracking for Security updates that are added to RHEL.
It works as a yum repo that gets constant additions, but does not directly replace CentOS 5.7 which is planned to be released in the next 2 weeks or so.
To me, the release info seemed a little rushed and just to be on the safe side I'll start doing my updates right away.
I wrote down the steps and added some notes that might be helpful if you're updating more than just 1 or 2 boxes.
Impatient people with few servers and no care for experience, just look at the steps 1, 5 and 7
People who already know how to restore a system broken during a rushed update and don't want to do that today might want to read the other steps, too.
Download the repository for your cpu arch (i686 & x86_64 only)
32bit users do:
cd /tmp && wget http://mirror.centos.org/centos/5.6/...tos.1.i386.rpm
64bit users do:
cd /tmp && wget http://mirror.centos.org/centos/5.6/...s.1.x86_64.rpm
Check you're already on CentOS 5.6 right now.
It's possible, but not fun, to jump more than 1 or 2 minor releases during a single upgrade.
If an RPM does any "fixes" in it's %pre or %post section it may fail badly.
So 5.5 to 5.6 or 5.7 is still quite ok, whereas 5.3 to 5.6 is already asking for major troble.
A almost current CentOS 5.6 would look like this:
# cat /etc/redhat-release ; uname -r
CentOS release 5.6 (Final)
The most current 5.6 kernel is version 238.19.1
Step 3 (optional):
Test everything is really up-to-date
Run yum update.
On my box there was the following updates:
Step 4 (recommended):
We're adding two yum plugins now:
yum-security plugin - this plugin is able to identify if you're missing any security updates.
It used to be a joke on CentOS but will now make a lot more sense once you get continous updates.
To use it you can later run:
yum --security check-update
Also we'll add the yum-download only plugin that allows to pre-fetch updates.
yum -y install yum-security yum-downloadonly
Installing the release rpm for CR will place the correct entry in /etc/yum/repos.d for yum to find.
rpm -i /tmp/centos-release-cr-5-6.el5.centos.1.i386.rpm
rpm -i /tmp/centos-release-cr-5-6.el5.centos.1.x86_64.rpm
Download the package list
Step 6 (optional):
Predownload the updates to your local cache directory.
This will be helpful if you want to run a backup before the update, and also if you want the update to be as fast as possible. Using the downloadonly plugin we'll just fetch the updates to yum's cache directory.
It'll be able to grab them from there and also you'll be able to distribute them to other system's cache directories.
yum update -y --downloadonly
Don't forget to clear the cache later on.
This is now the simple update.
yum -y update
In my case, on one of the test boxes the / filesystem would have run out of space.
Reason: I only provision around 500MB of space for / and during the first yum update I already had downloaded yet another kernel. Together these two bloaty kernels used up all available space as you can see above.
As you can see I took the lazy and fast way of this situation.
At least 9MB needed on the / filesystem.
# cd /
# du -kx | sort -rn | head
# lvextend -L 1024 /dev/vg00/lvol00
Extending logical volume lvol00 to 1.00 GB
Logical volume lvol00 successfully resized
# /sbin/resize2fs /dev/vg00/lvol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg00/lvol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/vg00/lvol00 to 1048576 (1k) blocks.
The filesystem on /dev/vg00/lvol00 is now 1048576 blocks long.
Here you can see the skipped waste of timedownload:
Install 1 Package(s)
Upgrade 57 Package(s)
Total size: 87 M