centos7 改用阿里yum源

1.备份原有yum源:    

mkdir /opt/centos-yum.bak 
mv /etc/yum.repos.d/*     /opt/centos-yum.bak/

2.下载阿里云yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3.清理缓存

yum clean all

4.重建缓存

yum makecache

猜你喜欢

转载自my.oschina.net/8808/blog/1788284
今日推荐