阿里云镜像
- https://opsx.alibaba.com/mirror
- https://blog.csdn.net/jameshadoop/article/details/54881295(修改yum源为阿里源)
-
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup -- 备份
-
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo -- 复制相对应的CentOS版本即可,本示例为CentOS 7
-
yum clean all -- 清理所有缓存 yum makecache -- 生成缓存