1、下载kernel包,如果浏览器下载不下来,就用自己的虚拟机下载下来:
wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/
2、安装RPM包
yum localinstall -y kernel-lt-5.4.154-1.el7.elrepo.x86_64.rpm
yum localinstall -y kernel-lt-devel-5.4.154-1.el7.elrepo.x86_64.rpm
3、查看当前系统上的所有可用内核启动项
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /boot/grub2/grub.cfg
4、修改默认启动项
grub2-editenv list
grub2-set-default 0
5、重启
reboot