centos5/6/7/8 (解决没有yum源支持的问题)


使用腾讯云镜像站支持yum源
官方文档:
https://mirrors.cloud.tencent.com/help/epel.html
https://mirrors.cloud.tencent.com/help/centos.html

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
# 获取对应版本的epel配置文件到/etc/yum.repos.d/目录
# epel(RHEL5系列)
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-5.repo
# epel(RHEL6系列)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-6.repo
# epel(RHEL7系列)
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
# 更新缓存
yum clean all && yum makecache
# 备份系统旧配置文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 获取对应版本的CentOS-Base.repo 到/etc/yum.repos.d/目录
# 各版本源配置列表
# CentOS5
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos5_base.repo
# CentOS6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos6_base.repo
# CentOS7
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
# CentOS8
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
# 更新缓存
yum clean all && yum makecache
# 常用镜像站
https://mirrors.cloud.tencent.com
https://developer.aliyun.com
https://mirrors.huaweicloud.com
http://archive.kernel.org/centos-vault
http://linuxsoft.cern.ch/centos-vault
http://mirror.nsc.liu.se/centos-store
https://vault.centos.org


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM