华为云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 以下,正常了。。,哎,睡眠时间总是不够。。。

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值