当前位置: 首页 > news >正文

CentOS 7.9 OS Kernel Update 3.10 to 4.19

date: 2024-01-18, 2024-01-26

原 OS Kernel 3.10
升级至 4.19

1.检查默认内核

  • 检查 vmlinuz 版本
[root@localhost ~]# grubby --default-kernel
/boot/vmlinuz-3.10.0-1160.105.1.el7.x86_64
[root@localhost ~]#
  • 检查 Linux 内核版本
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#

2.配置 yum 源

  • 备份原 repo 源文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mkdir bak;mv ./* bak
mv: cannot move ‘./bak’ to a subdirectory of itself, ‘bak/bak’
[root@localhost yum.repos.d]# ll
total 0
drwxr-xr-x 2 root root 220 Jan 25 20:24 bak
[root@localhost yum.repos.d]#
  • 下载阿里云 CentOS7 repo 源
[root@localhost yum.repos.d]# curl -o CentOS-Ali.repo https://mirrors.aliyun.com/repo/Centos-7.repo% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed
100  2523  100  2523    0     0   2789      0 --:--:-- --:--:-- --:--:--  2787
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# ll
total 4
drwxr-xr-x 2 root root  220 Jan 25 20:24 bak
-rw-r--r-- 1 root root 2523 Jan 25 20:25 CentOS-Ali.repo
[root@localhost yum.repos.d]#
  • 更新本地 repo 源
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum makecache fast
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
base                                                                                                                           | 3.6 kB  00:00:00
centosplus                                                                                                                     | 2.9 kB  00:00:00
extras                                                                                                                         | 2.9 kB  00:00:00
updates                                                                                                                        | 2.9 kB  00:00:00
Metadata Cache Created
[root@localhost ~]#
  • 查看 repo 源
[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
repo id                                                       repo name                                                                         status
base/7/x86_64                                                 CentOS-7 - Base - mirrors.aliyun.com                                              10,072
centosplus/7/x86_64                                           CentOS-7 - Plus - mirrors.aliyun.com                                                 277
extras/7/x86_64                                               CentOS-7 - Extras - mirrors.aliyun.com                                               518
updates/7/x86_64                                              CentOS-7 - Updates - mirrors.aliyun.com                                            5,558
repolist: 16,425
[root@localhost ~]#

3.下载内核离线包

cd /opt
wget http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm
wget http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-4.19.12-1.el7.elrepo.x86_64.rpm

4.安装内核

[root@localhost ~]# cd /opt/
[root@localhost opt]# ll
total 59068
-rw-r--r-- 1 root root 47850944 Jan 18 11:22 kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm
-rw-r--r-- 1 root root 12632052 Jan 18 10:59 kernel-ml-devel-4.19.12-1.el7.elrepo.x86_64.rpm
[root@localhost opt]# yum install ./*.rpm -y
...
Installed:kernel-ml.x86_64 0:4.19.12-1.el7.elrepo                                                  kernel-ml-devel.x86_64 0:4.19.12-1.el7.elrepoDependency Installed:perl.x86_64 4:5.16.3-299.el7_9            perl-Carp.noarch 0:1.26-244.el7                perl-Encode.x86_64 0:2.51-7.el7                    perl-Exporter.noarch 0:5.68-3.el7perl-File-Path.noarch 0:2.09-2.el7        perl-File-Temp.noarch 0:0.23.01-3.el7          perl-Filter.x86_64 0:1.49-3.el7                    perl-Getopt-Long.noarch 0:2.40-3.el7perl-HTTP-Tiny.noarch 0:0.033-3.el7       perl-PathTools.x86_64 0:3.40-5.el7             perl-Pod-Escapes.noarch 1:1.04-299.el7_9           perl-Pod-Perldoc.noarch 0:3.20-4.el7perl-Pod-Simple.noarch 1:3.28-4.el7       perl-Pod-Usage.noarch 0:1.63-3.el7             perl-Scalar-List-Utils.x86_64 0:1.27-248.el7       perl-Socket.x86_64 0:2.010-5.el7perl-Storable.x86_64 0:2.45-3.el7         perl-Text-ParseWords.noarch 0:3.29-4.el7       perl-Time-HiRes.x86_64 4:1.9725-3.el7              perl-Time-Local.noarch 0:1.2300-2.el7perl-constant.noarch 0:1.27-2.el7         perl-libs.x86_64 4:5.16.3-299.el7_9            perl-macros.x86_64 4:5.16.3-299.el7_9              perl-parent.noarch 1:0.225-244.el7perl-podlators.noarch 0:2.5.1-3.el7       perl-threads.x86_64 0:1.87-4.el7               perl-threads-shared.x86_64 0:1.43-6.el7Complete!
[root@localhost opt]#

5.更改内核启动顺序

[root@localhost ~]# grub2-set-default 0
[root@localhost ~]# grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.12-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.19.12-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-1160.105.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1160.105.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1160.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-cf7d56908f2b4b73bc25710041bda25d
Found initrd image: /boot/initramfs-0-rescue-cf7d56908f2b4b73bc25710041bda25d.img
done
[root@localhost ~]#
[root@localhost ~]# grubby --args="user_namespace.enable=1" --update-kernel="$(grubby --default-kernel)"
[root@localhost ~]#

6.检查内核版本

[root@localhost ~]# grubby --default-kernel
/boot/vmlinuz-4.19.12-1.el7.elrepo.x86_64
[root@localhost ~]#

7.重启

[root@localhost ~]# reboot

8.再次检查内核版本

[root@localhost ~]# uname -a
Linux localhost.localdomain 4.19.12-1.el7.elrepo.x86_64 #1 SMP Fri Dec 21 11:06:36 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#

9.修改启动界面显示的内核顺序

  • 注释掉 3.10 内核
[root@localhost ~]# vim /etc/grub2.cfg### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux (4.19.12-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.19.12-1.el7.elrepo.x86_64-advanced-5620e84e-0e87-41ad-9913-5292a8fd1d5e' {load_videoset gfxpayload=keepinsmod gzioinsmod part_msdosinsmod xfsset root='hd0,msdos1'if [ x$feature_platform_search_hint = xy ]; thensearch --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  1556ccd1-3879-4b8e-8b23-80f8a473557felsesearch --no-floppy --fs-uuid --set=root 1556ccd1-3879-4b8e-8b23-80f8a473557ffilinux16 /vmlinuz-4.19.12-1.el7.elrepo.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rhgb quiet user_namespace.enable=1initrd16 /initramfs-4.19.12-1.el7.elrepo.x86_64.img
}
# menuentry 'CentOS Linux (3.10.0-1160.105.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1160.105.1.el7.x86_64-advanced-5620e84e-0e87-41ad-9913-5292a8fd1d5e' {
#       load_video
#       set gfxpayload=keep
#       insmod gzio
#       insmod part_msdos
#       insmod xfs
#       set root='hd0,msdos1'
#       if [ x$feature_platform_search_hint = xy ]; then
#         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  1556ccd1-3879-4b8e-8b23-80f8a473557f
#       else
#         search --no-floppy --fs-uuid --set=root 1556ccd1-3879-4b8e-8b23-80f8a473557f
#       fi
#       linux16 /vmlinuz-3.10.0-1160.105.1.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rhgb quiet
#       initrd16 /initramfs-3.10.0-1160.105.1.el7.x86_64.img
# }
# menuentry 'CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1160.el7.x86_64-advanced-5620e84e-0e87-41ad-9913-5292a8fd1d5e' {
#       load_video
#       set gfxpayload=keep
#       insmod gzio
#       insmod part_msdos
#       insmod xfs
#       set root='hd0,msdos1'
#       if [ x$feature_platform_search_hint = xy ]; then
#         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  1556ccd1-3879-4b8e-8b23-80f8a473557f
#       else
#         search --no-floppy --fs-uuid --set=root 1556ccd1-3879-4b8e-8b23-80f8a473557f
#       fi
#       linux16 /vmlinuz-3.10.0-1160.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rhgb quiet
#       initrd16 /initramfs-3.10.0-1160.el7.x86_64.img
# }
menuentry 'CentOS Linux (0-rescue-cf7d56908f2b4b73bc25710041bda25d) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-cf7d56908f2b4b73bc25710041bda25d-advanced-5620e84e-0e87-41ad-9913-5292a8fd1d5e' {load_videoinsmod gzioinsmod part_msdosinsmod xfsset root='hd0,msdos1'if [ x$feature_platform_search_hint = xy ]; thensearch --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  1556ccd1-3879-4b8e-8b23-80f8a473557felsesearch --no-floppy --fs-uuid --set=root 1556ccd1-3879-4b8e-8b23-80f8a473557ffilinux16 /vmlinuz-0-rescue-cf7d56908f2b4b73bc25710041bda25d root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rhgb quietinitrd16 /initramfs-0-rescue-cf7d56908f2b4b73bc25710041bda25d.img
}### END /etc/grub.d/10_linux ###
  • 重启
[root@localhost ~]# reboot

我们下期见,拜拜!

相关文章:

CentOS 7.9 OS Kernel Update 3.10 to 4.19

date: 2024-01-18, 2024-01-26 原 OS Kernel 3.10 升级至 4.19 1.检查默认内核 检查 vmlinuz 版本 [rootlocalhost ~]# grubby --default-kernel /boot/vmlinuz-3.10.0-1160.105.1.el7.x86_64 [rootlocalhost ~]#检查 Linux 内核版本 [rootlocalhost ~]# uname -a Linux loc…...

k8s---安全机制

k8s的安全机制,分布式集群管理工具,就是容器编排。安全机制的核心:APIserver。为整个集群内部通信的中介,也是外控控制的入口。所有的机制都是围绕apiserver来进行设计: 请求api资源: 1、认证 2、鉴权 …...

GitHub 一周热点汇总第7期(2024/01/21-01/27)

GitHub一周热点汇总第7期 (2024/01/21-01/27) ,梳理每周热门的GitHub项目,离春节越来越近了,不知道大家都买好回家的票没有,希望大家都能顺利买到票,一起来看看这周的项目吧。 #1 rustdesk 项目名称:rust…...

kotlin data clas 数据类

data class 介绍 kotlin 中 data class 是一种持有数据的特殊类 编译器自动从主构造函数中声明的所有属性导出以下成员: .equals()/.hashCode() 对 .toString() 格式是 "User(nameJohn, age42)" .componentN() 函数 按声明顺序对应于所有属性。…...

Java基础知识-异常

资料来自黑马程序员 异常 异常,就是不正常的意思。在生活中:医生说,你的身体某个部位有异常,该部位和正常相比有点不同,该部位的功能将受影响.在程序中的意思就是: 异常 :指的是程序在执行过程中,出现的非正常的情况,…...

跟着cherno手搓游戏引擎【12】渲染context和首个三角形

渲染上下文&#xff1a; 目的&#xff1a;修改WindowsWindow的结构&#xff0c;把glad抽离出来 WindowsWindow.h:新建m_Context #pragma once #include "YOTO/Window.h" #include <YOTO/Renderer/GraphicsContext.h> #include<GLFW/glfw3.h> #include…...

MybatisPlus二级映射和关联对象ResultMap

文章目录 一、业务背景1. 数据库表结构2. 需求 二、使用映射直接得到指定结构三、其他文件1. Mapper2. Service3. Controller 四、概念理解一级映射二级映射聚合 五、标签使用1. \<collection\> 标签2. \<association\> 标签 在我们的教程中&#xff0c;我们设计了…...

低代码开发业务在AIGC时代的应用

随着人工智能和图形计算能力的快速发展&#xff0c;低代码开发平台在AIGC&#xff08;人工智能&#xff0c;物联网&#xff0c;大数据和云计算&#xff09;时代中扮演着至关重要的角色。本文将介绍低代码开发业务的概念和优势&#xff0c;探讨其在AIGC时代的应用及其对传统软件…...

惠普1536dnf MFP报52扫描仪错误维修

如果您使用的惠普HP LaserJet 1536dnf MFP打印机可能会遇到“52扫描仪错误”的提示。这个错误可能会阻止你使用打印机的扫描功能。在这里,我将提供一些有用的解决方法来帮助大家去解决这个问题。-----吴中函 故障描述: 一台某单位正在使用的惠普HP LaserJet 1536dnf MFP黑白…...

【MIdjourney】五个特殊物体关键词

1.碳酸(Carbonate) 这一词语的本意是指包含碳&#xff08;C&#xff09;、氧&#xff08;O&#xff09;和氢&#xff08;H&#xff09;元素的化合物。而在MIdjourney中添加该词汇会使得生成的图片具有水滴效果且富有动态感。 2.灯丝(Filament) Filament效果可能包括更逼真的…...

2024/1/27 备战蓝桥杯 1

目录 求和 0求和 - 蓝桥云课 (lanqiao.cn) 成绩分析 0成绩分析 - 蓝桥云课 (lanqiao.cn) 合法日期 0合法日期 - 蓝桥云课 (lanqiao.cn) 时间加法 0时间加法 - 蓝桥云课 (lanqiao.cn) 扫雷 0扫雷 - 蓝桥云课 (lanqiao.cn) 大写 0大写 - 蓝桥云课 (lanqiao.cn) 标题…...

初学数据结构:Java对象的比较

目录 1. PriorityQueue中插入对象2. 元素的比较2.1 基本类型的比较2.2 对象比较的问题 3. 对象的比较3.1 基于Comparable接口类的比较3.2 基于比较器比较3.3 三种方式对比 4. 集合框架中PriorityQueue的比较方式5. 使用PriorityQueue创建大小堆&#xff0c;解决TOPK问题 【本节…...

mac 10.15.7 Unity 2021.3.14 XCode 12.4 -> Unity IOS 自动安装 Cocoapods 失败解决方法

自己这两天在用Unity开发IOS时&#xff0c;遇到了安装Cocoapods失败的问题&#xff0c;记录一下问题及解决方法&#xff0c;便于自己后续查看&#xff0c;以及有相同遭遇的人查看 发生场景&#xff1a;打开 unity&#xff0c;触发自动安装 Cocoapods -> 安装失败&#xff08…...

Elasticsearch 中使用MustNot等同于不登录遇到的坑

1、在写关键词推荐时,需要把当前文章过滤掉,不能再推荐自己的文章,所以再es中需要用到 MustNot属性查询 /// <summary> /// 服务中心es检索 /// </summary> /// <param name="input"></param> /// <returns></…...

java抽象工厂实战与总结

文章目录 一、工厂模式&#xff08;三种&#xff09;1.简单工厂模式1.1 概念&#xff1a;1.2 使用场景&#xff1a;1.3 模型图解&#xff1a;1.4 伪代码&#xff1a; 2.工厂方法模式2.1 概念&#xff1a;2.2 使用场景&#xff1a;2.3 模型图解&#xff1a;2.4 伪代码 3.抽象工厂…...

Compose | UI组件(六) | 选择框

文章目录 前言Checkbox 复选框的含义Checkbox 复选框的使用Switch 单选框的含义Switch 单选框的使用Slider 滑竿组件的含义Slider 滑竿组件的使用 总结 前言 随着移动端的技术不断更新迭代&#xff0c;Compose也运用的越来越广泛&#xff0c;很多人都开始学习Compose 本文主要…...

C++拷贝构造函数、赋值学习整理:

拷贝构造函数&#xff1a; 概念&#xff1a; 构造函数的第一个参数&#xff0c;是类本身的const引用&#xff08;一般情况下没有其他参数&#xff0c;少数情况&#xff1a;其他参数必须有默认值&#xff01;&#xff09;称此类构造函数为拷贝构造函数 特征&#xff1a; 1&am…...

[亲测源码]ps软件网页版在线使用 PS网站程序源码 photoshop网页版源码 网页版的ps软件源码

在线PS作图修图网页版PHP网站源码&#xff0c;PHP在线照片图片处理PS网站程序源码photoshop网页版。 有很多朋友们都是在用PS作图的&#xff0c;众所周知在使用和学习PS时是需要下载软件的&#xff0c;Photoshop软件对电脑配置也是有一定要求的&#xff0c;今天就为大家带来一…...

前端大厂面试题探索编辑部——第二期

目录 题目 单选题1 题解 关于TCP 关于UDP 单选题2 题解 A选项的HTTP是否是无状态协议 B选项的HTTP支持的方法 C选项的关于HTTP的状态码 D选项HTTP协议的传输格式 题目 单选题1 1.以下哪个描述是关于 TCP 和 UDP 的区别&#xff08;&#xff09; A. TCP 是无连接的…...

yaml学习笔记

文章目录 yaml语言学习yaml 简介yaml 和json 区别基本语法数据类型YAML 对象YAML 数组锚点和引用纯量 参考文档 yaml语言学习 最近发现在学习k8s中各种配置文件 都是使用的yaml 这种格式, 包括 docker-compose.yaml 也都是用这个格式配置部署项目信息,我就了解了一下这个语法就…...

深度强化学习(王树森)笔记04

深度强化学习&#xff08;DRL&#xff09; 本文是学习笔记&#xff0c;如有侵权&#xff0c;请联系删除。本文在ChatGPT辅助下完成。 参考链接 Deep Reinforcement Learning官方链接&#xff1a;https://github.com/wangshusen/DRL 源代码链接&#xff1a;https://github.c…...

openssl3.2/test/certs - 074 - CT entry

文章目录 openssl3.2/test/certs - 074 - CT entry概述笔记setup074.shsetup074_sc1.shsetup074_sc2.shsetup074_sc3.shEND openssl3.2/test/certs - 074 - CT entry 概述 openssl3.2 - 官方demo学习 - test - certs 笔记 setup074.sh #! /bin/bash# \file setup074.sh# o…...

Angular组件(一) 分割面板ShrinkSplitter

Angular组件(一) 分割面板ShrinkSplitter 前言 分割面板在日常开发中经常使用&#xff0c;可将一片区域&#xff0c;分割为可以拖拽整宽度或高度的两部分区域。模仿iview的分割面板组件&#xff0c;用angular实现该功能&#xff0c;支持拖拽和[(ngModel)]双向绑定的方式控制区…...

抖音详情API:视频内容获取与解析技巧

一、引言 抖音是一款广受欢迎的短视频分享平台&#xff0c;每天都有大量的用户在抖音上分享自己的生活点滴和创意作品。对于开发者而言&#xff0c;如何获取并解析抖音上的视频内容&#xff0c;是一项极具挑战性的任务。本文将详细介绍抖音详情API&#xff0c;以及如何使用它来…...

SpringBoot中实现阿里云OSS对象存储

背景 在业务中我们往往需要上传文件如图片&#xff0c;文件上传&#xff0c;是指将本地图片、视频、音频等文件上传到服务器上&#xff0c;可以供其他用户浏览或下载的过程。文件上传在项目中应用非常广泛&#xff0c;我们经常发抖音、发朋友圈都用到了文件上传功能。 实现文件…...

大型语言模型 (LLM)全解读

一、大型语言模型&#xff08;Large Language Model&#xff09;定义 大型语言模型 是一种深度学习算法&#xff0c;可以执行各种自然语言处理 (NLP) 任务。 大型语言模型底层使用多个转换器模型&#xff0c; 底层转换器是一组神经网络。 大型语言模型是使用海量数据集进行训练…...

Unity - gamma space下还原linear space效果

文章目录 环境目的环境问题实践结果处理要点处理细节【OnPostProcessTexture 实现 sRGB 2 Linear 编码】 - 预处理【封装个简单的 *.cginc】 - shader runtime【shader需要gamma space下还原记得 #define _RECOVERY_LINEAR_IN_GAMMA】【颜色参数应用前 和 颜色贴图采样后】【灯…...

Rabbitmq调用FeignClient接口失败

文章目录 一、框架及逻辑介绍1.背景服务介绍2.问题逻辑介绍 二、代码1.A服务2.B服务3.C服务 三、解决思路1.确认B调用C服务接口是否能正常调通2.确认B服务是否能正常调用A服务3.确认消息能否正常消费4.总结 四、修改代码验证1.B服务异步调用C服务接口——失败2.将消费消息放到C…...

专业120+总分400+海南大学838信号与系统考研高分经验海大电子信息与通信

今年专业838信号与系统120&#xff0c;总分400&#xff0c;顺利上岸海南大学&#xff0c;这一年的复习起起伏伏&#xff0c;但是最后还是坚持下来的&#xff0c;吃过的苦都是值得&#xff0c;总结一下自己的复习经历&#xff0c;希望对大家复习有帮助。首先我想先强调一下专业课…...

如何区分 html 和 html5?

HTML&#xff08;超文本标记语言&#xff09;和HTML5在很多方面都存在显著的区别。HTML5是HTML的最新版本&#xff0c;引入了许多新的特性和元素&#xff0c;以支持更丰富的网页内容和更复杂的交互。以下是一些区分HTML和HTML5的关键点&#xff1a; 新特性与元素&#xff1a;H…...