解决CentOS6不能使用yum源

2020年11月30日 centos6各大开源镜像站已经停止维护了 但是阿里源还是可以用的 因为他的centos-vault仓库里放了之前版本的centos的包
 
只需要在centos命令行界面下执行一下几条命令
sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
touch /etc/yum.repo.d/CentOS-Base.repo
可以使用浏览器下载,下载网址如下:

#替换为官方Vault源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Official.repo

#替换为阿里云Vault镜像
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo

 
yum clean all yum makecache
 
yum就可以开心的使用了
 

posted @ 2022-01-04 10:35  秋天的风吹过原野  阅读(182)  评论(0编辑  收藏  举报