參考文件
國內主要開源的開源映象站點應該是網易和阿里雲了。
1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/centos-base.repo
[root@localhost ~]
# mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
2、進入yum源配置檔案所在的資料夾
[root@localhost ~]
# cd /etc/yum.repos.d/
3、檢視centos系統版本
[root@localhost ~]
#
lsb_release -a
centos7
[root@localhost yum.repos.d]# wget
centos6
[root@localhost yum.repos.d]# wget
centos5
[root@localhost yum.repos.d]# wget
5、執行yum makecache生成快取
[root@localhost yum.repos.d]# yum makecache
6、這時候再更新系統就會看到以下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
[root@localhost ~]# mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
2、檢視centos系統版本
[root@localhost ~]
#
lsb_release -a
[root@localhost ~]# wget -o /etc/yum.repos.d/centos-base.repo
centos6
[root@localhost ~]# wget -o /etc/yum.repos.d/centos-base.repo
centos5
[root@localhost ~]# wget -o /etc/yum.repos.d/centos-base.repo
4、執行yum makecache生成快取
[root@localhost ~]# yum makecache
5、這時候再更新系統就會看到以下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...