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
posted @ 2021-05-18 04:09  运维之爪  阅读(989)  评论(0编辑  收藏  举报