華爲雲yum鏡像源超慢改用阿里雲鏡像遇坑解決方法

又是深夜了,晚上搞了一臺華爲雲的雲服務器(哦不是是昨天晚上),本來想着是華爲本身就是做服務器的,所以在衆多大廠選擇了華爲,可偏偏下載個上傳下載命令都不得,任何命令都是蝸牛,然後心裏很不爽,怪不得阿里雲份額能超過你們幾個大廠總和,算了,不吐槽了,百度一番直接去改了阿里雲的鏡像源,步驟如下:

一、備份原來的鏡像源(其實沒必要)

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 http://mirrors.aliyun.com/repo/Centos-7.repo

 

三、清除yum緩存並重新生成緩存

yum clean all

yum makecache

 

本來想的是萬事大吉,可是偏偏makecache都慢的要死,反正是沒解決問題,然後注意到了一個叫做什麼epel對應的mirror怎麼還是日本的,想想就覺得不對,具體樣子如下:

[root@hw yum.repos.d]# yum makecache

Loaded plugins: fastestmirror

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Determining fastest mirrors

epel/x86_64/metalink

* base: mirrors.aliyun.com

* epel: ftp.jaist.ac.jp

* extras: mirrors.aliyun.com

* updates: mirrors.aliyun.com

 

注意紅色部分,然後就找度娘,各種yum epel的找,終於找到了解決辦法,不知道是不是解決辦法,反正下載變的像aliyun一樣快了

 

四、添加阿里雲的epel鏡像源:

wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo

然後再去 yum clean all 、 yum makecache 以下,正常了。。,哎,睡眠時間總是不夠。。。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章