CentOS修改映象為國內阿里雲源或163源
阿新 • • 發佈:2019-02-09
系統預設設定的是國外的。這樣就會導致下載速度緩慢。用國內幾家比較熱門的映象源,穩定性和速度很高。
下面的映象全部支援Linux的任何一個發行版的系統。
阿里雲Linux安裝映象源地址:http://mirrors.aliyun.com/
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
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
yum clean all
yum makecache
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
中科大的Linux安裝映象源:http://centos.ustc.edu.cn/
搜狐的Linux安裝映象源:http://mirrors.sohu.com/
北京首都線上科技:http://mirrors.yun-idc.com/
下面的映象全部支援Linux的任何一個發行版的系統。
拿Centos來進行做教程
阿里雲Linux安裝軟體映象源
得益與阿里雲的高速發展,阿里雲是最近新出的一個映象源。阿里雲Linux安裝映象源地址:http://mirrors.aliyun.com/
第一步:備份你的原映象檔案,以免出錯後可以恢復。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下載新的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
第三步:執行以下命令生成快取
yum clean all
yum makecache
163網易安裝軟體映象源
網易開源映象站:http://mirrors.163.com/第一步:備份你的原映象檔案,以免出錯後可以恢復。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下載新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
第三步:執行以下命令生成快取
yum clean all
yum makecache
除了阿里雲和163網易之外,國內還有其他不錯的yum源:
中科大的Linux安裝映象源:http://centos.ustc.edu.cn/
搜狐的Linux安裝映象源:http://mirrors.sohu.com/
北京首都線上科技:http://mirrors.yun-idc.com/