centos6yum源

个大网站都以关闭对centos6yum源的更新到处无法使用到处查找一下两个还可以正常使用

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo
yum clean all
yum makecache

 

 

20240524update:

if [ -f /etc/yum.repos.d/CentOS-Base.repo ];then mv /etc/yum.repos.d/CentOS-Base.repo{,_$(date +%F)_bak};fi
if [ -f /etc/yum.repos.d/epel.repo ];then mv /etc/yum.repos.d/epel.repo{,_$(date +%F)_bak};fi
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
sed -i 's/centos/centos-vault/g' /etc/yum.repos.d/CentOS-Base.repo
sed -i 's/$releasever/6.10/g' /etc/yum.repos.d/CentOS-Base.repo

yum clean all
yum makecache

posted @ 2021-04-02 17:39  echo$?  阅读(98)  评论(0编辑  收藏  举报