1. 程式人生 > >將Centos7的yum配置為阿里雲的映象(完美解決yum下載太慢的問題)

將Centos7的yum配置為阿里雲的映象(完美解決yum下載太慢的問題)

最近在研究一些深度學習框架和大資料視覺化的應用,經常會編譯一些檔案,而yum的預設地址下載太慢,所以用國內比較穩定的阿里雲源。

參考

http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD

話不多說,上命令

1、備份

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

2、下載新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5



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

CentOS 6



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

CentOS 7




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

3、之後執行yum makecache生成快取