一、阿里云的源配置官網(wǎng):https://opsx.alibaba.com/mirror

1.png
二、yum源配置
1、備份。把當(dāng)前CentOS操作系統(tǒng)默認(rèn)的yum源進(jìn)行備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下載。把阿里云的源下載下來(下載新的 CentOS-Base.repo 到 /etc/yum.repos.d/)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
3、運(yùn)行yum makecache生成緩存

2.png

3.png