Install latest Kernel on CentOS 6

Install latest Kernel on CentOS 6

By default CentOS 6 comes with kernel-2.6.x kernel. If you run yum update, it will update the latest kernel in kernel-2.6.x branch. It will not update to other major version.

CentOS 6 Kernel

If you wish to upgrade to latest kernel (kernel-3.10.x or kernel-4.10.x), you will need additional repository in your server. For CentOS 6, you can add elrepo which provides latest kernel for CentOS 6.

To add elrepo, you will need to execute following commands one by one:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh https://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-lt

Please ensure that elrepo-kernel block is added in your elrepo file. If it is not present, you can manually add the following code:

[elrepo-kernel]
name=ELRepo.org Community Enterprise Linux Kernel Repository - el6
baseurl=http://elrepo.org/linux/kernel/el6/$basearch/
        http://mirrors.coreix.net/elrepo/kernel/el6/$basearch/
        http://mirror.rackspace.com/elrepo/kernel/el6/$basearch/
        http://repos.lax-noc.com/elrepo/kernel/el6/$basearch/
        http://mirror.ventraip.net.au/elrepo/kernel/el6/$basearch/
mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-kernel.el6
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0

This will install latest kernel on your server. Before you reboot your server, please ensure that your hardware supports latest kernel and you have remote access or KVM access. You may need remote access if your server does not boot from the new kernel and you may need to switch back old kernel.

1 Comment

  1. SteveJune 23, 2019

    Thank you for sharing information. This helped me to use latest kernel on my server.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top