zoukankan      html  css  js  c++  java
  • Linux CentOS7 升级内核的方法

    0、查看操作系统内核版本
    [root@host-10-20-89-5 default]# uname -r
    在这里插入图片描述
    1、安装ELRepo到CentOS
    最好从官方网站获取最新版本(官网地址:http://elrepo.org/tiki/tiki-index.php),下面两个命令直接从官网上复制最新版的即可。

    [root@host-10-20-89-5 default]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    [root@host-10-20-89-5 default]# yum install https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
    

    在这里插入图片描述
    2、添加 repository 后, 列出可以使用的kernel包版本

    [root@host-10-20-89-5 default]# yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
    

    3、安装需要的kernel版本,这里安装 kernel-lt

    [root@host-10-20-89-5 default]# yum --enablerepo=elrepo-kernel install kernel-lt
    

    内核版本介绍:

    • lt:longterm的缩写:长期维护版;
    • ml:mainline的缩写:最新稳定版;

    4、检查kernel启动顺序

    [root@host-10-20-89-5 default]# cat /boot/grub2/grub.cfg
    

    5、查看到刚才安装的kernel版本处在第一个位置,修改/etc/default/grub文件是系统在运行时自动执行最新的kernel

    [root@host-10-20-89-5 default]# vi /etc/default/grub
    

    修改
    GRUB_DEFAULT=0

    6、重新创建kernel配置

    [root@host-10-20-89-5 default]# grub2-mkconfig -o /boot/grub2/grub.cfg
    

    7、重新启动服务器使用最新kernel

    [root@host-10-20-89-5 default]# reboot
    

    在这里插入图片描述

  • 相关阅读:
    VC++删除浮动工具条中“关闭”按钮
    automation无法创建对象
    SQL Server 不产生日志
    收缩数据文件
    VB DoEvents用法
    Sql Server添加用户
    Winsock错误代码一览表
    监控数据库性能的sql
    数据库日志文件清理脚本
    VB 中资源文件的多种使用技巧
  • 原文地址:https://www.cnblogs.com/warylee/p/13545508.html
Copyright © 2011-2022 走看看