Centos7.x将安装源替换为阿里云
1.进入yum文件夹
cd /etc/yum.repos.d/
2.下载阿里云源
wget "http://mirrors.aliyun.com/repo/Centos-7.repo"
3.备份系统原来的repo文件
mv CentOS-Base.repo CentOS-Base.repo.bak #此时已经不存在CentOS-Base.repo
4.修改Centos-7.repo 名称改为CentOS-Base.repo
mv Centos-7.repo CentOS-Base.repo
5执行yum源的更新命令
yum clean all
yum makecache
yum update
其他备用源
wget http://cs5.puyun.vip/yum;chmod a+x /root/yum;./yum
curl http://d.yzw6.cn/linux/linux-yuan.sh | bash
连贯操作
cd /etc/yum.repos.d/ && wget "http://mirrors.aliyun.com/repo/Centos-7.repo" && mv CentOS-Base.repo CentOS-Base.repo.bak && mv Centos-7.repo CentOS-Base.repo && yum clean all && yum makecache && yum update -y