linux CentOS 更换到aliyun源
配置方法
1. 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. 下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
CentOS 7 (Centos-7.repo请使用用自己系统对应的大版本)
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
如果没有wget执行以下命令安装wget
yum install wget
3.清除缓存和生成缓存
yum clean all
yum makecache