CentOS7系统配置国内yum源和epel源
1.首先进入/etc/yum.repos.d/目录下,新建一个repo_bak目录,用于保存系统中原来的repo文件
[root@node01 ~]# cd /etc/yum.repos.d/ [root@node01 yum.repos.d]# yum -y install wget [root@node01 yum.repos.d]# mkdir repo_bak [root@node01 yum.repos.d]# mv *.repo repo_bak/
2.在CentOS中配置使用网易和阿里的开源镜像
到网易和阿里开源镜像站点下载系统对应版本的repo文件
[root@node01 yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo [root@node01 yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo [root@node01 yum.repos.d]# ls CentOS7-Base-163.repo Centos-7.repo repo_bak [root@node01 yum.repos.d]# yum clean all [root@node01 yum.repos.d]# yum makecache
查看系统可用的yum源和所有的yum源
[root@node01 yum.repos.d]# yum repolist enabled 已加载插件: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/7/x86_64 CentOS-7 - Base - 163.com 10,097 extras/7/x86_64 CentOS-7 - Extras - 163.com 323 updates/7/x86_64 CentOS-7 - Updates - 163.com 1,117 repolist: 11,537
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?