1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/centos-base.repo
mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
2、進入yum源配置檔案所在的資料夾
cd /etc/yum.repos.d/
centos7
wget
centos6
wget
centos5
wget
4、執行yum makecache生成快取
yum makecache
5、這時候再更新系統就會看到以下mirrors.163.com資訊
[root@localhost yum.repos.d]# yum -y update
已載入外掛程式:fastestmirror, refresh-packagekit, security
設定更新程序loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/centos-base.repo
mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
wget -o /etc/yum.repos.d/centos-base.repo
centos6
wget -o /etc/yum.repos.d/centos-base.repo
centos5
wget -o /etc/yum.repos.d/centos-base.repo
3、執行yum makecache生成快取
yum makecache
4、這時候再更新系統就會看到以下mirrors.aliyun.com資訊
[root@localhost ~]# yum -y update
已載入外掛程式:fastestmirror, refresh-packagekit, security
設定更新程序loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
原文:
修改CentOS預設yum源為國內yum映象源
修改centos預設yum源為mirrors.163.com 1 首先備份系統自帶yum源配置檔案 etc yum.repos.d centos base.repo 1 root localhost mv etc yum.repos.d centos base.repo etc yum.repos....
修改CentOS預設yum源為國內yum映象源
修改centos預設yum源為mirrors.163.com 1 首先備份系統自帶yum源配置檔案 etc yum.repos.d centos base.repo 1 root localhost mv etc yum.repos.d centos base.repo etc yum.repos....
修改CentOS預設yum源為國內yum映象源
修改centos預設yum源為mirrors.163.com 1 首先備份系統自帶yum源配置檔案 etc yum.repos.d centos base.repo mv etc yum.repos d centos base.repo etc yum.repos d centos base.rep...