CentOS 6的yum源配置(最新地址)


CentOS 6 操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。建议您升级操作系统至CentOS 7及以上,如果您的业务过渡期仍需要使用CentOS 6系统中的一些安装包,请根据下文切换CentOS 6的源。

背景信息
2020年11月30日CentOS 6 EOL。按照社区规则,CentOS 6的源地址http://mirror.centos.org/centos-6/内容已移除,目前第三方的镜像站中均已移除CentOS 6的源。阿里云的源http://mirrors.cloud.aliyuncs.com和http://mirrors.aliyun.com也无法同步到CentOS 6的源。
当您在使用默认配置的CentOS 6的源会发生报错。报错示例如下图所示:

##  https://www.cnblogs.com/liucx/

解决方法:
CentOS-Base源

cat > /etc/yum.repos.d/CentOS-Base.repo <

epel源

cat > /etc/yum.repos.d/epel.repo <

运行以下命令生成缓存

yum clean all
yum makecache

参考:https://help.aliyun.com/document_detail/193569.htm