CentOS7系统升级最新内核

1. 查看当前系统内核版本:
# uname -r
3.10.0-514.26.2.el7.x86_64

2.系统更新:
yum -y update

3.启用 ELRepo 仓库
ELRepo 仓库是基于社区的用于企业级 Linux 仓库,提供对 RedHat Enterprise (RHEL) 和 其他基于 RHEL的 Linux 发行版(CentOS、Scientific、Fedora 等)的支持。

# rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

4.安装最新内核
# yum –enablerepo=elrepo-kernel install kernel-lt

内核安装好后,把最新的内核设置为默认启动选。

5.查看系统上的所有可以内核
# sudo awk -F\’ ‘$1==”menuentry ” {print i++ ” : ” $2}’ /etc/grub2.cfg
0 : CentOS Linux (4.15.6-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-514.26.2.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
3 : CentOS Linux (0-rescue-f9d400c5e1e8c3a8209e990d887d4ac1) 7 (Core)

6.设置默认选:
#sudo grub2-set-default 0
#sudo grub2-editenv list
saved_entry=0 //生效了
#sudo reboot

7.重启后验证:
# uname -r
4.15.6-1.el7.elrepo.x86_64

 

(0)
下一篇 2022年6月11日 下午5:05

相关推荐

  • uname命令使用教程

    使用uname命令可以帮助我们了解当前使用的系统的硬件信息,内核信息,处理器信息和当前使用的系统信息等。该命令可以在Fedora, Debian, CentOS, SUSE Lin…

    服务器 2022年6月11日
    435
  • windows系统查看占用的端口

    点击开始菜单->运行->cmd程序。或者是window+R组合键,调出命令窗口查询命令:netstat -aon|findstr “8080” …

    2022年6月11日
    468