Centos7配置yum国内源(BaseOS+epel+ELRepo+SCL+IUS+REMI),支持EL8到EL10
Centos7配置yum国内源下载国内yum源文件基于 RHEL 的八个 YUM/DNF 第三方存储库配置基础源配置base源(推荐)配置CentOS Vault源---防止yum源过期下载阿里云的base源下载163的base源刷新源查看源是否添加成功安装epel源替换epel.repo文件刷新源查看源是否添加成功验证epel源是否正常使用安装ELRepo源安装4.4以上版本内核安装SCL源安装IUS源安装REMI源安装raven源RHEL7配置raven源安装endpoint-repoCentos7安装endpoint-repo其他国内常用源启用禁用的源使用指定的yum仓库安装包下载国内yum源文件# 从博主的gitcode上下载已经配置好的yum源文件.gitclone https://gitcode.com/liqiaofei/centos7_yum_repo.git笔者会持续维护 yum源文件的可用性.基于 RHEL 的八个 YUM/DNF 第三方存储库https://www.51cto.com/article/706719.html# 安装可能的依赖插件yuminstall-yopen-vm-tools redhat-lsbwgetyum-axelget yum-fastestmirror# 安装epel源和ELRepo源(依赖epel源)yuminstall-yepel-release elrepo-release# 安装SCL源## centos-release-scl centos-release-scl-rh是SCL源## scl-utils scl-utils-build是SCL-utils工具yuminstall-ycentos-release-scl centos-release-scl-rh scl-utils scl-utils-build# 安装IUS源(依赖依赖epel源)## 导入IUS源gpg keyrpm--importhttps://repo.ius.io/RPM-GPG-KEY-IUS-7## 安装IUS源yuminstall-yhttps://repo.ius.io/ius-release-el7.rpm# 安装REMi源yuminstall-yhttp://rpms.famillecollet.com/enterprise/remi-release-7.rpm# 查看repolistyum repolist配置基础源该源包含base,updates,epel,会自动匹配Centos系统版本参考: https://mirrors.ustc.edu.cn/help/centos.html[base]nameCentOS-$releasever- Base#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoosinfra$infrabaseurlhttps://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/gpgcheck1gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates[updates]nameCentOS-$releasever- Updates#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoupdatesinfra$infrabaseurlhttps://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/gpgcheck1gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]nameCentOS-$releasever- Extras#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepoextrasinfra$infrabaseurlhttps://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/gpgcheck1gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]nameCentOS-$releasever- Plus#mirrorlisthttp://mirrorlist.centos.org/?release$releaseverarch$basearchrepocentosplusinfra$infrabaseurlhttps://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/gpgcheck1enabled0gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7配置base源参考: https://mirrors.bfsu.edu.cn/help/centos/参考 https://developer.aliyun.com/mirror/centos# 备份Base.reposudomv/etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup(推荐)配置CentOS Vault源—防止yum源过期参考https://mirrors.ustc.edu.cn/help/centos.htmlCentOS 7 已于 2024 年 6 月 30 日结束维护如有需要继续使用 CentOS7请使用CentOS Vault镜像。# 编辑CentOS-Base.repovi/etc/yum.repos.d/CentOS-Base.repo内容如下[base]nameCentOS-7.9.2009 - Base - mirrors.aliyun.comfailovermethodprioritybaseurlhttps://mirrors.aliyun.com/centos-vault/7.9.2009/os/$basearch/gpgcheck0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#released updates[updates]nameCentOS-7.9.2009 - Updates - mirrors.aliyun.comfailovermethodprioritybaseurlhttps://mirrors.aliyun.com/centos-vault/7.9.2009/updates/$basearch/gpgcheck0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]nameCentOS-7.9.2009 - Extras - mirrors.aliyun.comfailovermethodprioritybaseurlhttps://mirrors.aliyun.com/centos-vault/7.9.2009/extras/$basearch/gpgcheck0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]nameCentOS-7.9.2009 - Plus - mirrors.aliyun.comfailovermethodprioritybaseurlhttps://mirrors.aliyun.com/centos-vault/7.9.2009/centosplus/$basearch/gpgcheck0enabled0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users[contrib]nameCentOS-7.9.2009 - Contrib - mirrors.aliyun.comfailovermethodprioritybaseurlhttps://mirrors.aliyun.com/centos-vault/7.9.2009/contrib/$basearch/gpgcheck0enabled0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7下载阿里云的base源# 下载阿里云的base源wget-O/etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo# 如果没有wget程序则使用curl下载curl-o/etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo下载163的base源# 下载163的base源wget-O/etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo# 如果没有wget程序则使用curl下载curl-o/etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo刷新源# 快速生成缓存sudoyum makecache fast# 生成完整缓存sudoyum clean allsudoyum makecache查看源是否添加成功# 查看yum源是否添加成功sudoyum repolist安装epel源Extra Packages for Enterprise Linux企业版 Linux 额外软件包缩写为epel;epel源中有许多高质量的扩展软件例如htop,ncdu,nginx,vnstat修改为清华源# 安装epel源yuminstallepel-release-y# 手动安装rpm-ivhhttps://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm# 备份epel.repomv/etc/yum.repos.d/epel.repo epel.repo{,.bak}# 直接下载epel.repowget-O/etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo# 或curl-o/etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo# 有时候aliyun会抽风连不上,可以换用其他国内源curl-o/etc/yum.repos.d/epel.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo替换epel.repo文件适用于RHEL7手动创建epel.repo,将下方配置3选1粘贴到epel.repo# 手动编辑epel.repo文件vim/etc/yum.repos.d/epel.repo配置内容如下中科大的源# 中科大的epel源---建议[epel-USTC]nameepel-USTC--CentOS-$releaseverbaseurlhttps://mirrors.ustc.edu.cn/epel-archive/$releasever/$basearch/enabled1gpgcheck0阿里云的epel源https://developer.aliyun.com/mirror/epel?spma2c6h.13651102.0.0.3e221b11ILV8ex# 阿里云的epel源[epel-aliyun]nameepel-aliyun-CentOS-$releaseverbaseurlhttps://mirrors.aliyun.com/epel-archive/$releasever/$basearch/gpgcheck0保存# 保存:wq刷新源# 快速生成缓存sudoyum makecache fast# 生成完整缓存sudoyum clean allsudoyum makecache查看源是否添加成功# 查看yum源是否添加成功sudoyum repolist验证epel源是否正常使用从epel源中安装htop包# 安装htopyuminstall-yhtop安装ELRepo源用来更新内核,Centos7的内核默认只到3.10,这个源可以更新到最新的内核.例如5.4https://blog.csdn.net/omaidb/article/details/126462414安装4.4以上版本内核https://blog.csdn.net/omaidb/article/details/121856924安装SCL源https://blog.csdn.net/omaidb/article/details/126462159安装IUS源为RHEL和CentOS提供高质量、最新版的软件如PHP, Python, MySQL等。参考https://blog.csdn.net/omaidb/article/details/126462236安装REMI源Remi源中的软件几乎都是最新稳定版,这些都是Linux骨灰级的玩家编译好放进源里的.Remi下载地址http://rpms.famillecollet.com/参考: https://wsgzao.github.io/post/epel/阿里云镜像: https://mirrors.aliyun.com/remi/enterprise/# Centos7安装remi源yuminstall-yhttp://rpms.famillecollet.com/enterprise/remi-release-7.rpm# Centos7安装REMI源(国内安装)yuminstall-yhttps://mirrors.aliyun.com/remi/enterprise/remi-release-7.rpm# rhel8安装remi源yuminstall-yhttp://rpms.famillecollet.com/enterprise/remi-release-8.rpm安装raven源源项目地址https://pkgs.dyn.su/参考https://sysadmins.ws/viewtopic.php?f96t22598sidb17673c41ea6e1a8f6ccb9b39bbf967c# rhel8安装raven源dnf localinstall-yhttps://pkgs.dyn.su/el8/base/x86_64/raven-release.el8.noarch.rpmRHEL7配置raven源[raven]nameRavens Packages for EL baseurlhttp://pkgs.dyn.su/$releasever/base/$basearch/ enabled1 gpgcheck0 [raven-httpd] nameRavens httpd buildforELbaseurlhttp://pkgs.dyn.su/$releasever/httpd/$basearch/enabled0gpgcheck0[raven-extras]nameRavens Extra Packages for EL baseurlhttp://pkgs.dyn.su/$releasever/extras/$basearch/ enabled0 gpgcheck0 [raven-testing] nameRavens Unstsble PackagesforELbaseurlhttp://pkgs.dyn.su/$releasever/testing/$basearch/enabled0gpgcheck0安装endpoint-repo源地址https://packages.endpointdev.com/Centos7安装endpoint-repo# Centos7安装endpoint-repoyuminstall-yhttps://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm其他国内常用源参考: https://wiki.centos.org/zh/AdditionalResources/Repositories启用禁用的源# 启用PowerTools源sudoyum config-manager –set-enabled PowerTools使用指定的yum仓库安装包# 从指定的yum仓库中安装包yum--enablereporepo名install包名# 从所有yum仓库中安装包yum--enablerepo*install包名# 禁止从指定的yum仓库中安装包yum--disablereporepo名install包名

相关新闻

7.SpringBoot面试题

7.SpringBoot面试题

7.SpringBoot面试题1. SpringBoot自动配置原理是什么?2.开启SpringBoot特性有哪几种方式?3.SpringBoot如何解决跨域问题4.SpringBoot如何整合Mybatis5.SpringBoot怎么实现多环境配置?6.SpringBoot的核心注解有哪些?7.SpringBoot中…

2026/10/11 4:02:56 阅读更多 →
归纳推理法-理解C语言的指针

归纳推理法-理解C语言的指针

如果想改变一个变量的值,可以使用赋值语句改变其原有的值,如果改变这个变量的语句比较多的话,写在一个原有的作用域里面显得有些累赘且思路模糊,使用函数调用可以解决上面的问题,函数调用可以让变量的修改意图更加明显…

2026/10/11 4:02:56 阅读更多 →
STM32CubeMx + makefile --- 文件系统 fatfs

STM32CubeMx + makefile --- 文件系统 fatfs

STM32CubeMx makefile — 文件系统fatfs 源码仓库: 码云仓库 文章目录STM32CubeMx makefile --- 文件系统fatfs[toc]环境添加串口打印printfSTM32CubeMX 配置配置 SDMMC配置 FATFS时钟配置设置栈空间生成 makefile 项目修改代码编译 (略)烧录 (略)运行环境 工具版本说明开发…

2026/10/11 4:02:56 阅读更多 →

最新新闻

AI应用架构设计:图解动态能力组合与落地避坑指南

AI应用架构设计:图解动态能力组合与落地避坑指南

1. 这不是画PPT,是给AI系统搭骨架“图解AI应用架构设计”这六个字,乍看像培训课件标题,实则藏着当前一线AI落地最常踩的深坑——很多人花三个月调出一个98%准确率的模型,上线后却卡在日均处理200条请求就超时;也有人把…

2026/10/11 4:49:23 阅读更多 →
HIL-SERL:通过人机协作强化学习实现精确灵巧的机器人操作

HIL-SERL:通过人机协作强化学习实现精确灵巧的机器人操作

目录 1.仓库核心架构 1.1 整体方法:HIL-SERL 1.2 系统架构 1.3 代码结构 2.复现过程 2.1 硬件 2.2 环境搭建 基于UR5e真机部署的源码 SERL:RL+Vision+Touch实现搜孔和插拔 传统力控搜孔插孔:预先规划好移动的轨迹,这个规划的轨迹会覆盖搜孔区域,实际搜孔的过程中,需要紧贴…

2026/10/11 4:49:23 阅读更多 →
claude-mem:给Claude加装长期记忆,终结AI对话失忆

claude-mem:给Claude加装长期记忆,终结AI对话失忆

先别急着往下看,我问你一个场景:你天天在终端里和 Claude 聊需求、调代码、捋思路,是不是每次新开一个会话,它都像第一次见你一样,把你之前说过的技术栈、项目结构、踩过的坑全忘得干干净净?你只能一遍遍复…

2026/10/11 4:49:23 阅读更多 →
AI导出鸭:解决大模型内容到正式文档的语义转换难题

AI导出鸭:解决大模型内容到正式文档的语义转换难题

1. 为什么“导出”成了AI落地最卡脖子的环节“我让AI写完了一份市场分析初稿,但卡在最后一步——怎么把它变成一份能发给客户的PDF?”“模型输出的内容逻辑很顺,可一粘贴到Word里格式全乱了,标题变正文、列表缩进错位、代码块直接…

2026/10/11 4:49:23 阅读更多 →
研发制造企业SRM选型:项目化管控是隐形刚需

研发制造企业SRM选型:项目化管控是隐形刚需

做企业采购数字化这块时间久了,看系统选型会有个条件反射:一听到对方说“我们要上一套SRM”,我第一反应不是问版本、问价格,而是先弄清楚这家企业是“管采购”还是“管供应链”。如果是研发制造型企业,我会再加一问&am…

2026/10/11 4:49:23 阅读更多 →
动力电池分类全解析:从材料体系到选型原则

动力电池分类全解析:从材料体系到选型原则

目录一、动力电池整体分类维度二、按电化学材料体系分类三、按电芯结构形态分类四、按功率特性分类五、按封装集成层级分类六、国标官方电池分类体系七、消费电池、储能电池、动力电池工况对比八、动力电池选型基本原则九、本节核心知识点小结一、动力电池整体分类维度动力电池…

2026/10/11 4:48:23 阅读更多 →

日新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/11 0:00:27 阅读更多 →

周新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/11 0:00:27 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/10 5:23:50 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/9 21:32:20 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/10 10:38:42 阅读更多 →