一、CentOS 7.9 升级内核 kernel-ml-5.6.14版本
地址
http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS
默认内核版本为3.10.0,现升级到 5.6.14 版本
查看当前内核版本
[root@localhost ~]# uname -r
3.10.0-1160.53.1.el7.x86_64
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版本的方法的文章就介绍到这了,更多相关CentOS 7.9 升级内核内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!