Wednesday, February 3, 2010

yum update to specific kernel version

SkyHi @ Wednesday, February 03, 2010

On rhel 5.3 I want to update to kernel version "2.6.18-128.8.1.el5" due to a security patch.

when performing:

<code>yum check-update | grep kernel
kernel.x86_64 2.6.18-164.2.1.el5 rhel-x86_64-server-5
kernel-devel.x86_64 2.6.18-164.2.1.el5 rhel-x86_64-server-5
kernel-headers.x86_64 2.6.18-164.2.1.el5 rhel-x86_64-server-5

But 2.6.18-164.2.1.el5 correspond to rhel 5.4, and I dont want to move to this version, I want to keep rhel 5.3.

I tried yum update kernel-2.6.18-128.8.1

But it seems to be the wrong way. How could I update the server to this specific kernel version?


You are on the right track. You just didn't specify the kernel version the way yum expects it. The correct command would be

yum install kernel-2.6.18-128.8.1.el5

(Note that kernel packages are not updates for each other, each of them is a separate install, and the old ones remain until you run "rpm -e".)

How can I keep the RHEL version static (e.g. RHEL 5.1)?


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?


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

<code>$ rpm -qf /etc/redhat-release<br />redhat-release-5Server-<br /></code>

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

<code>[main]<br />exclude=redhat-release-5Server-*<br /></code>

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...