CentOS 8 upgrades the latest kernel through YUM
View current kernel
uname -r
4.18.0-193.6.3.el8_2.x86_64
Import the public key of the ELRepo warehouse:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Install the yum source repository related to upgrading the kernel (install the yum source of the ELRepo repository)
yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
Set YUM source parameters (view available system kernel installation packages)
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
YUM executes kernel upgrade (installs the latest kernel version)
yum -y --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel
Set to boot the latest kernel (set to boot with new kernel)
grubby --set-default /boot/vmlinuz-6.5.2-1.el8.elrepo.x86_64
- Note here that the version number is the latest version number you just installed. Here 6.5.2 is an example.
Restart
reboot
View the upgraded kernel
uname -r
6.5.2-1.el8.elrepo.x86_64