How to Install or Upgrade to Kernel 5.8 in CentOS 7, CWP7 and VestaCP

by Sandeep B.

In this tutorial we’ll updating/installing Kernel 5.5 on Linux OS – Centos 7. So what is kernel? -A kernel is the lowest level of easily replaceable software that interfaces with the hardware in your computer/server. It is responsible for interfacing all of your applications that are running in “user mode” down to the physical hardware, and allowing processes, known as servers, to get information from each other using inter-process communication (IPC).

In order to Update Kernel This requirements are mandatory :

    • Centos 7 with root access
  • KVM virtualization/any other full virtualization OR Dedicated Server
  • SSH/Terminal access

Let’s started with Kernel install/update procedure :

Check current kernel version :

uname -sr

Eg. output :

[root@server ~]# uname -sr
Linux 3.10.0-123.4.2.el7.x86_64
#version may vary 

Now We’ll Start the procedure of Kernel upgrade on CentOS 7 :

We need to enable the ELRepo repository on CentOS 7, run the below commands :

rpm --import
rpm -Uvh

You can retrieve latest download links on official page here

Now we’ll install Kernel 4.19 with the below command :

** at the time kernel 4.19 was available as latest version, for latest versions the procedure will be the same.

yum --enablerepo=elrepo-kernel install kernel-ml -y

Now kernel 4.19 will downloaded and installed this process will take some time to complete.

Now we need to add/modify config under /etc/default/grub :

nano /etc/default/grub

And put this line or modify the line if already exists to :


eg :

[root@server ~]# cat /etc/default/grub
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb quiet"

Save the file and run this command to create the kernel configs :

grub2-mkconfig -o /boot/grub2/grub.cfg

That’s it reboot your server and check the kernel version again :

uname -sr
[root@server ~]# uname -sr
Linux 5.8.5-1.el7.elrepo.x86_64

TO update :

yum clean all
yum --enablerepo=elrepo-kernel install kernel-ml
yum --enablerepo=elrepo-kernel update kernel-ml
grub2-mkconfig -o /boot/grub2/grub.cfg

Clean Old Kernels :

yum install yum-utils -y
package-cleanup --oldkernels --count=1

Advanced cleanup (this will remove old kernel headers and tools):

rpm -qa kernel\* |sort -V
rpm -e --nodeps kernel-tools kernel-tools-libs kernel-headers

Eg. usage :

[root@srv1 ~]# rpm -qa kernel\* |sort -V

[root@srv1 ~]# rpm -e --nodeps kernel-tools-3.10.0-957.10.1.el7.x86_64 kernel-tools-libs-3.10.0-957.10.1.el7.x86_64 kernel-headers-3.10.0-957.10.1.el7.x86_64

TO install Latest Kernel-ML devel and tool package:

yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml-tools

If this post helps you in any way please consider a donation

Donate with PayPal :


You may also like


Stanislav Panayotov April 19, 2018 - 2:24 pm

I report this bug:
Whit kernel-ml 4.16.0-1.el7.elrepo, kernel-ml 4.16.1-1.el7.elrepo and kernel-ml 4.16.2-1.el7.elrepo ssh client is not connecting over IPv6.

Sandy April 19, 2018 - 11:59 am

nice find (Y)

Automata December 31, 2019 - 6:14 am


Your solution not work for CWP (Centos Web Panel) and CWP PRO (Centos Web Panel Pro) !!!

I made this update whit this guide from Kernel v3.x to Kernel v5.x but at the moment CWP PRO (Centos Web Panel Pro) for Centos 7 has reported it automatically and by itself to the Kernel v3.x !

Please help me to solve this problem.

Thanks in advance for the support.

Sandy January 1, 2020 - 11:02 am

ensure you’ve stock OS kernel.


Leave a Comment