centos 设置阿里的yum源

rm /etc/yum.repos.d/CentOS-Base.repo


curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo


rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7


yum clean all
yum makecache

原文地址:https://www.cnblogs.com/ljy-1471914707/p/15682113.html