查看内核

uname -r

设置内核源

主要是 http://elrepo.org/tiki/tiki-index.php

ELRepo 仓库是基于社区的用于企业级 Linux 仓库,提供对 RedHat Enterprise (RHEL) 和 其他基于 RHEL的 Linux 发行版(CentOS、Scientific、Fedora 等)的支持。
ELRepo 聚焦于和硬件相关的软件包,包括文件系统驱动、显卡驱动、网络驱动、声卡驱动和摄像头驱动等。

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm

查看可用系统内核包

yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

4.4 和5.2 可以使用

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* elrepo-kernel: hkg.mirror.rackspace.com
elrepo-kernel                                                                                                                                                        | 2.9 kB  00:00:00
elrepo-kernel/primary_db                                                                                                                                             | 1.8 MB  00:00:00
Available Packages
kernel-lt.x86_64                                                                                                          4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-lt-devel.x86_64                                                                                                    4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-lt-doc.noarch                                                                                                      4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-lt-headers.x86_64                                                                                                  4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-lt-tools.x86_64                                                                                                    4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-lt-tools-libs.x86_64                                                                                               4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-lt-tools-libs-devel.x86_64                                                                                         4.4.190-1.el7.elrepo                                                                                          elrepo-kernel
kernel-ml-devel.x86_64                                                                                                    5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
kernel-ml-doc.noarch                                                                                                      5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
kernel-ml-headers.x86_64                                                                                                  5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
kernel-ml-tools.x86_64                                                                                                    5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
kernel-ml-tools-libs.x86_64                                                                                               5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
kernel-ml-tools-libs-devel.x86_64                                                                                         5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
perf.x86_64                                                                                                               5.2.11-1.el7.elrepo                                                                                           elrepo-kernel
python-perf.x86_64                                                                                                        5.2.11-1.el7.elrepo

安装最新内核

yum --enablerepo=elrepo-kernel install kernel-ml

设置内核

更新内核

grub2-mkconfig -o /boot/grub2/grub.cfg

输出

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.2.11-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-5.2.11-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-957.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-3ec831eb45704879a36ae8fd8a558327
Found initrd image: /boot/initramfs-0-rescue-3ec831eb45704879a36ae8fd8a558327.img
done

查看系统内核

cat /boot/grub2/grub.cfg |grep menuentry
if [ x"${feature_menuentry_id}" = xy ]; thenmenuentry_id_option="--id"menuentry_id_option=""
export menuentry_id_option
menuentry 'CentOS Linux (5.2.11-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-5.2.11-1.el7.elrepo.x86_64-advanced-682078f3-2c57-4d07-9bc0-50758075a37a' {
menuentry 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.27.2.el7.x86_64-advanced-682078f3-2c57-4d07-9bc0-50758075a37a' {
menuentry 'CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-682078f3-2c57-4d07-9bc0-50758075a37a' {
menuentry 'CentOS Linux (0-rescue-3ec831eb45704879a36ae8fd8a558327) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-3ec831eb45704879a36ae8fd8a558327-advanced-682078f3-2c57-4d07-9bc0-50758075a37a' {

设置内核

先复制要设置的内核CentOS Linux (5.2.11-1.el7.elrepo.x86_64) 7 (Core)
设置默认内核

grub2-set-default "CentOS Linux (5.2.11-1.el7.elrepo.x86_64) 7 (Core)"

验证

grub2-editenv list

重启电脑

reboot

验证内核

uname -r

输出

5.2.11-1.el7.elrepo.x86_64

参考
http://elrepo.org/tiki/tiki-index.php
https://blog.csdn.net/kikajack/article/details/79396793
https://blog.csdn.net/cacacai/article/details/79727218

centos7 升级最新版内核相关推荐

  1. Centos7升级到最新内核版本操作过程

    虽然有些人使用 Linux 来表示整个操作系统,但要注意的是,严格地来说,Linux 只是个内核.另一方面,发行版是一个完整功能的系统,它建立在内核之上,具有各种各样的应用程序工具和库. 在正常操作期 ...

  2. Linux Glibc幽灵漏洞紧急修补方案;Centos7升级内核到3.18

    本文转载:http://ixdba.blog.51cto.com/2895551/1609526 幽灵漏洞是Linux glibc库上出现的一个严重的安全问题,他可以让***者在不了解系统的任何情况下 ...

  3. Linux 升级到指定内核(Centos7 yum升级内核、centos系统中kernel-devel)

    文章目录 一.Linux 升级内核 Centos7 yum/rpm升级到最新内核 Centos 7 rpm升级到指定内核 关于Linux依赖包资源下载 二.Linux内核源码的编译及安装 三.设置 g ...

  4. Centos7升级内核——图文详尽版

    Linux是一种开源电脑操作系统内核.它是一个用C语言写成,符合POSIX标准的类Unix操作系统. Linux最早是由芬兰 Linus Torvalds为尝试在英特尔x86架构上提供自由的类Unix ...

  5. Linux centos7升级内核(两种方法:内核编译和yum更新)

                Linux centos7升级内核(两种方法:内核编译和yum更新) Linux的内核概念不用说大家也很清楚,正是内核版本的不同,才有Linux发行版本的说法,现在主流的cen ...

  6. k8s安装之Linux centos7升级内核到4.18以上

    rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-rel ...

  7. centos7 升级内核

    为什么要升级内核? Docker 在CentOS系统中需要安装在 CentOS 7 64 位的平台,并且内核版本不低于 3.10:CentOS 7.× 满足要求的最低内核版本要求,但由于 CentOS ...

  8. linux升级到指定内核版本,如何在CentOS/RHEL上安装或升级新的内核版本

    Linux内核是一个整体的类Unix计算机操作系统内核.通常我们使用的Linux发行版,如Red Hat.Debian.SUSE等,这些都称为Linux的分发版.一个典型的分发版,是由Linux内核, ...

  9. 升级 Ubuntu Linux 内核的几种不同方法 | Linux 中国

    转载自:升级 Ubuntu Linux 内核的几种不同方法 | Linux 中国 升级 Ubuntu Linux 内核的几种不同方法 | Linux 中国 译者/Ping Yang  Linux  2 ...

  10. centos7升级到centos8

    1.前言 本文来说明下从centos7升级到centos8,我们使用最进本的dnf来做.这里说明的是升级是把所有的rpm都升级上去,如果系统中有非rpm包安装的文件,还是要备份下.索性把整个系统备份下 ...

最新文章

  1. java逻辑移位和算术移位,关于对移位运算的理解
  2. 计算机教育的进制转换,计算机数制及编码进制转换公开课教学教育资料.doc
  3. java lambda循环_在Java 8 Lambda中创建自己的循环结构
  4. aws cognito_AWS Cognito的用户管理—(2/3)核心功能
  5. 诺基亚2亿欧元建越南新工场
  6. 北航教授吐槽研究生基本废了:985高校成高级蓝翔
  7. Typora的图片根目录设置,
  8. [swift] LeetCode 20. Valid Parentheses
  9. 小学校园计算机兴趣小组,小学计算机兴趣小组活动记录文本.doc
  10. 分布式缓存Redis使用以及原理
  11. 吉大 c语言程序设计 51课 6cd,03MCS51单片机C语言程序设计.ppt
  12. 【笔记】用Python写百度翻译网络爬虫
  13. Box2d VS Nape 学习笔记
  14. sci论文配色-生信论文可视化绘图配色[个人收集]
  15. 前端微信签名验证工具_微信支付服务商签名验证无误,但是统一下单后服务器返回【签名错误】...
  16. OCR-光学符号识别
  17. sql中如何添加数据
  18. Python中按位取反运算操作的解法
  19. Win10修改远程桌面3389端口
  20. 企业微信有哪些优势?哪些行业适合用企微SCRM工具做营销?

热门文章

  1. 可用性测试启发式评估十条原则介绍
  2. [转载]仿射变换(Affine Transformation)
  3. 拓端tecdat|R语言用多重插补法估算相对风险
  4. 拓端tecdat|matlab估计arma garch 条件均值和方差模型
  5. unity 加载关卡_Unity手游实战:从0开始SLG——本地化篇(四)提取本地化元素
  6. 响应服务器589,示例HTTP范围请求会话
  7. Servlet教程第7讲笔记
  8. python中赋值与c语言区别,python中赋值与c语言区别
  9. 3、贝叶斯优化相关理论知识
  10. wordpress元素查找PHP文件,小部件中的php按类获取元素(wordpress)