准备
yum -y install wget
切换并修改yum源的子配置文件
- cd /etc/yum.repos.d
- mkdir bak
- mv *.repo bak
下载国内yum源
#阿里yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#扩展yum源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
重新建立缓存
yum clean all && yum makecache