1. 程式人生 > >CentOS7 中把預設yum源更換成163源

CentOS7 中把預設yum源更換成163源

163源是目前國內最好用的源,速度是相當快的,現在我們把CentOS7中的源改為163源

1、進入yum源配置檔案  

cd /etc/yum.repos.d

2、備份一下當前的源,以防出錯後可以還原回來

mv ./CentOS-Base.repo ./CentOS-Base-repo.bak

3、下載網易163的源

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

4、清理一下舊包

yum clean all

5、把下載下來檔案CentOS7-Base-163.repo設定成為預設源

mv CentOS7-Base-163.repo CentOS-Base.repo

6、生成快取即可用163源了

yum makecache

 

轉自CentOS7 中把yum源更換成163源