How to upgrade the Linux Kernel?
Every once in a while a Linux server needs to be upgraded to the latest available kernel. Reason for this can be performance, security, or feature availability. Most often security is the biggest concern for a system admin to apply a newer kernel to a Linux server. Upgrading the kernel is fairly easy on Red Hat Linux systems that are configured to use the Red Hat Network.
To update the kernel on a Red Hat Enterprise Linux system, do the following (in this example we use a Red Hat Enterprise Linux ES 3.0 system / single processor). Login to your server via SSH and SU to the root user. At the command line prompt type:
up2date -if kernel
The screenshot shows what your system would be doing after the command has been executed.
A kernel upgrade is pretty straight forward and should complete fairly quick. After the upgrade is complete you should check your grub.conf file (/boot/grub/grub.conf) to make sure that the newest kernel installed on top and default is set to 0 (zero). Do not remove the older kernel version entries from grub.conf yet. If your system would experience problems with the new kernel you will need at least one older version listed to fall back to.
As an additional step you should also run a "up2date -l" to see if there are any other kernel packages that may need to be updated such as kernel-source or kernel-utils. Once this step is completed your system should be rebooted to start the server with the new kernel.
Once you are sure that the server runs fine on the newer kernel you can do some cleanup work by removing an older kernel version from your system. This can be done from the command line as follows:
rpm -e kernel-version
Legal disclaimer: The advice given in this article does not contain any guarantee that this will work on your server. Please check with your system admin, data center, or OS manufacturer to make sure you execute the appropriate commands to update the kernel on your server. We cannot be held responsible for any problems you might experience.