Centos 7 使用国内镜像源更新内核

内核选择参考 此博文 :https://blog.csdn.net/alwaysbefine/article/details/108931626

elrepo官网介绍的内核升级方式为:

一、按文档执行引入 elrepo库;

bash 复制代码
# 1、引入公钥
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

# 2、安装库索引
yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm 

二、按清华镜像站修改镜像源 (https://mirrors.tuna.tsinghua.edu.cn/help/elrepo/

接下来是换源,建议先备份 /etc/yum.repos.d/elrepo.repo

复制代码
sudo cp /etc/yum.repos.d/elrepo.repo /etc/yum.repos.d/elrepo.repo.bak

然后编辑 /etc/yum.repos.d/elrepo.repo 文件,在 mirrorlist= 开头的行前面加 # 注释掉;并将 http://elrepo.org/linux 替换为

复制代码
https://mirrors.tuna.tsinghua.edu.cn/elrepo

最后,更新软件包缓存

复制代码
sudo yum makecache

三、 查询可用内核

bash 复制代码
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

四、安装内核

bash 复制代码
 yum --enablerepo=elrepo-kernel install kernel-lt -y

安装最新稳定内核,本文试验时 版本为 kernel-lt.x86_64.0.5.4.249-1.el7.elrepo

五、修改grub 设置新内核为启动默认项

bash 复制代码
grub2-set-default 0 && grub2-mkconfig -o /etc/grub2.cfg

六、重启验证

bash 复制代码
reboot 

# 验证内核
uname -r 
相关推荐
BullSmall5 分钟前
Anolis OS 8.10 Docker 部署 SonarQube 9.9 完整教程
运维·docker·容器
AAA@峥13 分钟前
CentOS7 搭建 ELK 企业级日志集群:从部署到日志可视化完整实战
运维·elk·centos
ZKNOW甄知科技19 分钟前
燕千云深度集成飞书:以AI之力,开启无感IT运维体验
大数据·运维·网络·数据库·人工智能·低代码·集成学习
叮咚侠26 分钟前
docker安装的kibana+elasticsearch,突然kibana界面打不开了
运维·jenkins
nVisual28 分钟前
数据中心机柜负载均衡与三相相位监控方案
运维·网络·负载均衡·数据中心布线·综合布线管理软件
国服第二切图仔30 分钟前
02-breakpoint-system
运维·harmonyos
Molesidy33 分钟前
【GUI】【AWTK】基于开阳平台的GUI界面设计环境搭建
linux·gui·awtk
RisunJan44 分钟前
Linux命令-semanage(SELinux 策略管理)
linux·运维·服务器
流浪0011 小时前
Linux系统篇 21:文件(五)——动静态库、ELF 底层原理全解
linux·运维·服务器
Dawn-bit1 小时前
Linux救援模式和系统恢复
linux·运维·服务器·云计算·运维开发