linux修改yum源映象源

2021-08-15 16:39:43 字數 2380 閱讀 8557

修改centos預設yum源為國內yum映象源

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

修改centos預設yum源為國內yum映象源

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映象源

linux修改yum源映象源

修改centos預設yum源為國內yum映象源 1 首先備份系統自帶yum源配置檔案 etc yum.repos.d centos base.repo 備份前建議先安裝wget,yum install wget root localhost mv etc yum.repos.d centos bas...

linux 修改映象源

deepin 系統修改源 deb camel main contrib non free deb camel main contrib non free ubantu配置apt軟體源 清華大學開源映象 幫助頁面 阿里雲開源映象 網易開源映象 蘭州大學開源映象 東北大學開元映象 2019.03.19進...

linux 修改CENTOS映象源

阿里雲linux安裝軟體映象源 centos系統更換軟體安裝源 第一步 備份你的原映象檔案,以免出錯後可以恢復。第三步 執行yum makecache生成快取 yum makecache 163安裝軟體映象源 163開源映象站是國內比較老的乙個 很多人都在使用。從這裡就可以看出來,網易,果然是業界良...