解决CentOS6停止更新支持后yum源失效
https://vault.centos.org/ 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 makecache
或者直接自己创建 .repo文件
[centos-office] name=centos-office failovermethod=priority baseurl=https://vault.centos.org/6.5/os/x86_64/ # 根据当前系统版本来修改 gpgcheck=1 gpgkey=https://vault.centos.org/6.5/os/x86_64/RPM-GPG-KEY-CentOS-6 # 根据当前系统的版本来修改 sslverify=false # 不验证ssl yum clean all yum makecache yum repolist
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://mirrors.cloud.tencent.com/repo/centos5_base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos6_base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
yum clean all yum makecache