升级Linux系统内核

帅比萌擦擦* 提交于 2019-12-20 04:05:24

有时在服务器上安装一些服务来满足日常需要时,常常因为内核的原因放弃,本篇博文就来解决这个难题。

实施步骤:

[root@localhost ~]# uname -r                  //查看系统内核
3.10.0-862.el7.x86_64
[root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
//载入公钥
[root@localhost ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
//安装ELRepo
[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel repolist
//载入elrepo-kernel元数据
[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel list kernel*
//查看可用的rpm包
[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel install -y kernel-ml.x86_64
//安装最新版的kernel

重新启动,就会出现如图:
升级Linux系统内核

[root@localhost ~]# yum -y remove kernel-tools-libs.x86_64 kernel-tools.x86_64 
//删除旧版工具包
[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel install -y kernel-ml-tools.x86_64
//安装新版工具包
[root@localhost ~]# uname -r                 //查看当前系统版本内核
5.4.5-1.el7.elrepo.x86_64
[root@localhost ~]# rpm -qa | grep kernel          //查询系统中的全部内核
[root@localhost ~]# yum remove -y kernel-3.10.0-862.el7.x86_64 
//删除多余内核

重启之后,如图:
升级Linux系统内核

——————————本文到此结束,感谢阅读——————————

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!