CentOS7替换阿里YUM源
将默认的.repo文件重命名。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
从阿里的开源镜像站下载repo文件,并替换到yum.repos.d目录下。
curl -LO http://mirrors.aliyun.com/repo/Centos-7.repo
# arm架构使用此地址:https://mirrors.aliyun.com/repo/Centos-altarch-7.repo
mv Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
重建yum缓存。
yum clean all
yum makecache
yum install epel-release -y