背景
Centos 7默认的yum源网络不好使,所以更改yum源为阿里云
解决方案
命令,可选两种方式均可以,此种命令更换源为阿里云
一
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
二
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
命令 生成缓存
yum makecache