CentOS 7.9 升级内核 kernel-ml-5.6.14版本的方法

本站所有内容来自互联网收集,仅供学习和交流,请勿用于商业用途。如有侵权、不妥之处,请第一时间联系我们删除!Q群:迪思分享

免费资源网 – https://freexyz.cn/

一、CentOS 7.9 升级内核 kernel-ml-5.6.14版本

地址

http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS

CentOS 7.9 升级内核 kernel-ml-5.6.14版本的方法插图

默认内核版本为3.10.0,现升级到 5.6.14 版本

查看当前内核版本

[root@localhost ~]# uname -r 3.10.0-1160.53.1.el7.x86_64

CentOS 7.9 升级内核 kernel-ml-5.6.14版本的方法插图1

wget 下载

wget http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-5.6.14-1.el7.elrepo.x86_64.rpm wget http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-5.6.14-1.el7.elrepo.x86_64.rpm

安装

[root@ecs-65685 ~]# rpm -ivh kernel-ml-5.6.14-1.el7.elrepo.x86_64.rpm warning: kernel-ml-5.6.14-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY Preparing… ################################# [100%] Updating / installing… 1:kernel-ml-5.6.14-1.el7.elrepo ################################# [100%] [root@ecs-65685 software]# rpm -ivh kernel-ml-devel-5.6.14-1.el7.elrepo.x86_64.rpm warning: kernel-ml-devel-5.6.14-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY Preparing… ################################# [100%] Updating / installing… 1:kernel-ml-devel-5.6.14-1.el7.elre################################# [100%]

查看当前内核

[root@ecs-65685 ~]# cat /boot/grub2/grub.cfg |grep ^menuentry menuentry CentOS Linux (5.6.14-1.el7.elrepo.x86_64) 7 (Core) –class centos –class gnu-linux –class gnu –class os –unrestricted $menuentry_id_option gnulinux-3.10.0-1160.el7.x86_64-advanced-f5954a19-b069-42e4-a6ca-3a1cd06d0735 { menuentry CentOS Linux (3.10.0-1160.53.1.el7.x86_64) 7 (Core) –class centos –class gnu-linux –class gnu –class os –unrestricted $menuentry_id_option gnulinux-3.10.0-1160.el7.x86_64-advanced-f5954a19-b069-42e4-a6ca-3a1cd06d0735 { menuentry CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core) –class centos –class gnu-linux –class gnu –class os –unrestricted $menuentry_id_option gnulinux-3.10.0-1160.el7.x86_64-advanced-f5954a19-b069-42e4-a6ca-3a1cd06d0735 { menuentry CentOS Linux (0-rescue-acca19161ce94d449c58923b12797030) 7 (Core) –class centos –class gnu-linux –class gnu –class os –unrestricted $menuentry_id_option gnulinux-0-rescue-acca19161ce94d449c58923b12797030-advanced-f5954a19-b069-42e4-a6ca-3a1cd06d0735 {

设置启动内核

[root@ecs-65685 ~]# grub2-set-default 0 # 或者 grub2-set-default CentOS Linux (5.6.14-1.el7.elrepo.x86_64) 7 (Core)

重新生成一个grub2配置文件

[root@ecs-65685 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file … Found linux image: /boot/vmlinuz-5.6.14-1.el7.elrepo.x86_64 Found initrd image: /boot/initramfs-5.6.14-1.el7.elrepo.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-1160.53.1.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-1160.53.1.el7.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-1160.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-acca19161ce94d449c58923b12797030 Found initrd image: /boot/initramfs-0-rescue-acca19161ce94d449c58923b12797030.img done

重启系统

[root@ecs-65685 ~]# reboot

确认下是否启动默认内核指向上面安装的内核

[root@ecs-65685 ~]# grubby –default-kernel /boot/vmlinuz-5.6.14-1.el7.elrepo.x86_64

确认使用的内核版本

uname -r

CentOS 7.9 升级内核 kernel-ml-5.6.14版本的方法插图2

免费资源网 – https://freexyz.cn/


© 版权声明
THE END
★喜欢这篇文章吗?喜欢的话,麻烦动动手指支持一下!★
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容