注意安装内核kernel5.4.261版本会与ssh9.4和9.5版本冲突,导致重启之后ssh链接不了
1.查看现在的内核
uname -r
3.10.0-1160.el7.x86_64
2.下载rpm内核,离线安装
下载页面 https://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/
rpm -ivh kernel-lt-5.4.242-1.el7.elrepo.x86_64.rpm
3.查看已安装内核启动 顺序
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
可以看到
CentOS Linux (5.4.242-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-caedfea595854b188de6a5a614533c03) 7 (Core)
4.设置启动顺序,其中最上面的从0开始,5.4.242版本为0
grub2-set-default 0
5.重启
reboot
标签:x86,elrepo,升级,centos7.9,64,内核,242,el7 From: https://www.cnblogs.com/xiaoxiaomuyuyu/p/17884618.html