CentOS is known for not using the latest versions of the Linux kernel. If you need up-to-date versions, you need to configure the OS to use different repositories.
The turtle and the hare
Among the different linux distributions, I’ve always liked and used CentOS. It’s a great solution, it helps also to learn RedHat in case one would have to work with it, and has tons of resources available online to learn and get help. But one of the limits in CentOS has always been the lack of up-to-date kernels. This article has been written in November 2015, and while the latest stable kernel of Linux is 4.2.6:
Available Linux kernels as of November 2015
on a completely up-to-date CentOS 7 machine, the used kernel is quite older:
Note, I’ve not said “outdated”, if you look at the list 3.10 is there as “longterm”. It’s good for production environments to use really stable and tested versions of the kernel, but I use a lot technologies like Ceph and BTRFS, and for those to work properly it’s recommended to use the latest possible kernels, as enhancements to those software is made available as kernel is updated. For example, I was facing an issue with the rebalancing of a BTRFS partition spread among different disks, and I found a fix was made available in kernel 3.14. So, I had to find a way to have newer kernels in my CentOS machines.
Install newer kernel on CentOS
As the main repository of CentOS has no newer version of the kernel, we need first of all to use a 3rd party repository. New kernels for CentOS are available via “ELRepo”.
First, we download the GPG key of ELRepo and install the elrepo-release package.
Now, we enable the repository (vi /etc/yum.repos.d/elrepo.repo and set enabled to 1 for [elrepo-kernels] ); then, we need to remove the old kernel headers to avoid conflicts:
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy