CentOS 7 升级内核

CentOS 7 升级内核

参考地址:How to Install or Upgrade to Kernel 4.19 in CentOS 7

Step 1: Checking Installed Kernel Version

  • 查看当前版本
$ uname -sr

Step 2: Upgrading Kernel in CentOS 7

  • To enable the ELRepo repository on CentOS 7:
$ rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
$ rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
  • 查看可用的最新版本列表
$ yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
  • Install the latest mainline stable kernel:
$ yum --enablerepo=elrepo-kernel install kernel-ml
  • 重启,选择刚安装的内核开机登录

  • 登录成后,查看版本

$ uname -sr
Linux 4.19.8-1.el7.elrepo.x86_64

Step 3: Set Default Kernel Version in GRUB

  • 修改GRUB配置文件
$ cd /etc/default/
$ vim grub

  • 修改 GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DEFAULT=0  //修改此项
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
  • 使GRUB配置文件生效
$ grub2-mkconfig -o /boot/grub2/grub.cfg
  • 重启,默认开机内核便是最新内核了

Congratulations! You have upgraded your kernel in CentOS 7!

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值