你的centos6/7是不是不能使用了,报404 not found错?
一、修改yum源为aliyun源
#备份CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak #修改yum源 #CentOS6为: wget -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo #Centos7为: wget -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
二、修改CentOS-Base.repo配置
#备份配置文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak2 #修改配置 vim /etc/yum.repos.d/CentOS-Base.repo [centos-office] name=centos-office failovermethod=priority baseurl=https://vault.centos.org/6.10/os/x86_64/ gpgcheck=1 gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
三、测试
#清空yum缓存 yum clean all #重建yum缓存 yum makecache #列出yum列表 yum list