Updating RHEL to specific minor release

There are times when updating to the latest minor release is not preferred, maybe a software compatibility issue or just plain stupidity. On RHEL 6.1 and beyond, one can utilzie the releasever parameter to lock the update to specific one. For example:

yum –releasever=6.2 update

But what about RHEL5.x? Redhat suggested mounting the corresponding ISO and set it up as a local repository. Lots of work especially when it’s required for no good reason.

Here there seems to be another way to do it. First, using the update-to option to install the redhat-release package you need. For instance, I want to upgrade from 5.7 to 5.8:

yum update-to redhat-release-5Server-5.8.0.3

Thereis a little trick here, the last release digit needs to be guessed. So I tried from 5.8.0.0 and finally found 5.8.0.3 is available. It can be done with the yum info command.

Next thing is to prevent further update of the redhat-release package. Edit /etc/yum.conf and add

exclude=redhat-release*

Then run yum update as usual.

[[email protected] ~]# lsb_release  -r
Release:    5.8

References:

  • https://access.redhat.com/site/solutions/92383