如何在 Centos7 中使用阿里雲的yum源

1. 備份原來的yum源centos

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup緩存

 

2. 下載阿里雲的CentOS-Base.repo 到/etc/yum.repos.d/curl

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

或者url

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repospa

執行結果以下圖:3d

 

3. 清理緩存blog

sudo yum clean allget

執行結果:下載

 

4. 生成新的緩存

sudo yum makecache

執行結果:

 

相關連接:

阿里雲開源鏡像站

相關文章
相關標籤/搜索