修改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.d/centos-base.repo.backup
2、進入yum源配置檔案所在的資料夾
1
[root@localhost ~]
# cd /etc/yum.repos.d/
centos7
1
[root@localhost yum.repos.d]
# wget
centos6
1
[root@localhost yum.repos.d]
# wget
centos5
1
[root@localhost yum.repos.d]
# wget
4、執行yum makecache生成快取
1
[root@localhost yum.repos.d]
# yum makecache
5、這時候再更新系統就會看到以下mirrors.163.com資訊
1
2
3
4
5
6
[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
修改centos預設yum源為mirrors.aliyun.com
1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/centos-base.repo
1
[root@localhost ~]
# mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
1
[root@localhost ~]
# wget -o /etc/yum.repos.d/centos-base.repo
centos6
1
[root@localhost ~]
# wget -o /etc/yum.repos.d/centos-base.repo
centos5
1
[root@localhost ~]
# wget -o /etc/yum.repos.d/centos-base.repo
3、執行yum makecache生成快取
1
[root@localhost ~]
# yum makecache
4、這時候再更新系統就會看到以下mirrors.aliyun.com資訊
1
2
3
4
5
6
[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 mv etc yum.repos d centos base.repo etc yum.repos d centos base.rep...
修改CentOS預設yum源為國內yum映象源
修改centos預設yum源為mirrors.163.com 1 首先備份系統自帶yum源配置檔案 etc yum.repos.d centos base.repo root localhost mv etc yum.repos.d centos base.repo etc yum.repos.d ...