CentOS 7 升级内核

一、centos 7 下载地址 https://www.centos.org/download/

                       升级参考 http://elrepo.org/tiki/tiki-index.php

二、实验机器(当前内核)

 

[root@localhost ~]# uname -r   
3.10.0-862.el7.x86_64 #当前版本的内核

[root@localhost ~]# sudo yum list kernel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.sohu.com
 * extras: mirrors.cn99.com
 * updates: mirrors.sohu.com
Installed Packages
kernel.x86_64                                              3.10.0-862.el7                                                  @anaconda
kernel.x86_64                                              3.10.0-862.3.2.el7                                              installed
[root@localhost ~]#

三、开始

1、载入公钥

[root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2、安装elrepo

[root@localhost ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

 

3、载入elrepo-kernel元数据

 

[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel repolist

4、查看可用rpm

 

[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel list kernel*

 

5、安装

 

[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel install -y kernel-ml.x86_64

一次截图没截完。

6、查看系统中的全部内核

[root@localhost ~]# rpm -qa | grep kernel
kernel-3.10.0-862.3.2.el7.x86_64
kernel-tools-3.10.0-862.3.2.el7.x86_64
kernel-ml-4.16.13-1.el7.elrepo.x86_64
kernel-3.10.0-862.el7.x86_64
abrt-addon-kerneloops-2.1.11-50.el7.centos.x86_64
kernel-headers-3.10.0-862.3.2.el7.x86_64
kernel-tools-libs-3.10.0-862.3.2.el7.x86_64
[root@localhost ~]# 

7、重启

[root@localhost ~]# reboot

8、升级内核工具包(刚才删除的多余就是工具包。如果没有删除可以执行一些命令)我的删除了 ,所以没什么可以删的了

[root@localhost ~]# yum remove kernel-tools-libs.x86_64 kernel-tools.x86_64

 

最后升级工具包命令

 

[root@localhost ~]# yum --disablerepo=\* --enablerepo=elrepo-kernel install -y kernel-ml-tools.x86_64

 

 

 

                                                                    

清除旧内核请看  CentOS 7 清除旧内核

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值