Redhat – How to keep the RHEL version static (e.g. RHEL 5.1)

redhatupdateyum

For compatibility with a program :

  • I need to keep one of our servers in a specific version, for example rhel 5.1
  • I would like to keep it as updated as possible, but not to change versions.

What should I do:

Configure yum?
Configure satellite repository?

Best Answer

Do not update the package called redhat-release-5Server-

$ rpm -qf /etc/redhat-release
redhat-release-5Server-5.3.0.3

Make sure to pin that package. If you do edit /etc/yum.conf and put this in it

[main]
exclude=redhat-release-5Server-*

yum would refrain from updating that package and that would keep /etc/redhat-release at its current version.

Not sure why you would want this though...