進入阿里鏡像網站,選擇相應的系統源。
https://developer.aliyun.com/mirror/
CentOS7
先清除系統默認的repo
下載基本源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
下載擴展源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
更新yum
yum makecache