Run the following command to know your current kernel:
To enable the ELRepo repository on CentOS 7, do:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Once the repository has been enabled, you can use the following command to list the available kernel related packages:
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
Run the following command to install the latest mainline stable kernel:
yum --enablerepo=elrepo-kernel install kernel-ml
To make the newly-installed version the default boot option, you will have to modify the GRUB configuration as follows:
Open and edit the file /etc/default/grub and set GRUB_DEFAULT=0. This means that the first kernel in the GRUB list will be used as default.
To insert/edit the file enter 'i' for insert mode and insert the following at End Of Fle. After inserting, save the file by hitting Esc key and then ':' [colon] followed by wq and enter
Run the following command to recreate the kernel configuration:
grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot and verify that the latest kernel is now being used by default using the uname command again:
You have upgraded your system kernel to the latest version available!