默认内核版本为3.10.0,现升级到4.18.9版本
查看当前内核版本
[root@localhost ~]# uname -r
3.10.0-514.el7.x86_64
自行查找需要的内核版本(比较全的lt和ml版本):http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/
或者下载网上找来的4.18.9版本内核文件(3个rpm包): 蓝奏网盘下载 kernel-4.18.9 密码:2u4l
[root@localhost ~]# tar xf kernel-ml-4.18.9.tar.gz
[root@localhost ~]# cd kernel-ml-4.18.9
[root@k8s-master kernel-ml-4.18.9]# yum localinstall kernel-ml*
Loaded plugins: fastestmirror
Examining kernel-ml-4.18.9-1.el7.elrepo.x86_64.rpm: kernel-ml-4.18.9-1.el7.elrepo.x86_64
Marking kernel-ml-4.18.9-1.el7.elrepo.x86_64.rpm to be installed
Examining kernel-ml-devel-4.18.9-1.el7.elrepo.x86_64.rpm: kernel-ml-devel-4.18.9-1.el7.elrepo.x86_64
Marking kernel-ml-devel-4.18.9-1.el7.elrepo.x86_64.rpm to be installed
Examining linux-firmware-20180911-69.git85c5d90.el7.noarch.rpm: linux-firmware-20180911-69.git85c5d90.el7.noarch
linux-firmware-20180911-69.git85c5d90.el7.noarch.rpm: does not update installed package.
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.18.9-1.el7.elrepo will be installed
---> Package kernel-ml-devel.x86_64 0:4.18.9-1.el7.elrepo will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================================================================
Installing:
kernel-ml x86_64 4.18.9-1.el7.elrepo /kernel-ml-4.18.9-1.el7.elrepo.x86_64 203 M
kernel-ml-devel x86_64 4.18.9-1.el7.elrepo /kernel-ml-devel-4.18.9-1.el7.elrepo.x86_64 45 M
Transaction Summary
==========================================================================================================================================================================================================
Install 2 Packages
Total size: 248 M
Installed size: 248 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : kernel-ml-devel-4.18.9-1.el7.elrepo.x86_64 1/2
Installing : kernel-ml-4.18.9-1.el7.elrepo.x86_64 2/2
Verifying : kernel-ml-4.18.9-1.el7.elrepo.x86_64 1/2
Verifying : kernel-ml-devel-4.18.9-1.el7.elrepo.x86_64 2/2
Installed:
kernel-ml.x86_64 0:4.18.9-1.el7.elrepo kernel-ml-devel.x86_64 0:4.18.9-1.el7.elrepo
Complete!
设置默认启动新内核 并重新生成grub2
# 查看当前内核
[root@k8s-master kernel-ml-4.18.9]# cat /boot/grub2/grub.cfg |grep ^menuentry
menuentry 'CentOS Linux (4.18.9-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1127.el7.x86_64-advanced-abb47b92-d268-4d8c-a9df-43bf44522cab' {
menuentry 'CentOS Linux (3.10.0-1127.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1127.el7.x86_64-advanced-abb47b92-d268-4d8c-a9df-43bf44522cab' {
menuentry 'CentOS Linux (0-rescue-63f20fbd07a048dc88574233e1ad966b) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-63f20fbd07a048dc88574233e1ad966b-advanced-abb47b92-d268-4d8c-a9df-43bf44522cab' {
# 设置启动内核
[root@localhost kernel-ml-4.18.9]# grub2-set-default 0
或者
[root@localhost kernel-ml-4.18.9]# grub2-set-default 'CentOS Linux (4.18.9-1.el7.elrepo.x86_64) 7 (Core)'
[root@localhost kernel-ml-4.18.9]# grub2-mkconfig -o /boot/grub2/grub.cfg
#重启系统
[root@localhost kernel-ml-4.18.9]# reboot
确认使用的内核版本
[root@localhost ~]# uname -r
4.18.9-1.el7.elrepo.x86_64
本文最后记录时间 2024-03-30
文章链接地址:https://me.jinchuang.org/archives/539.html
本站文章除注明[转载|引用|来源],均为本站原创内容,转载前请注明出处
文章链接地址:https://me.jinchuang.org/archives/539.html
本站文章除注明[转载|引用|来源],均为本站原创内容,转载前请注明出处
升级成功了 666 谢谢楼主 希望明天docker不会死了
感谢楼主,kernel-ml-4.18.9.tar.gz只能下载,对应链接打不开,请问有相应地址吗
这个地址:http://35.196.108.58/centos/7/elrepo-kernel/x86_64/RPMS/
感谢楼主,请问lt版本的4.18有吗
您好,请问下请问下,ml版本现在还有4.14的吗
这个地址里面有的,就是要加载很久才出来:http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/
你看看这里有你需要的内核版本不:http://52.45.193.166/mirrors/http/elrepo.org/linux/kernel/el7/x86_64/RPMS/
来学习下