阿里云服务器(ECS)CentOS修改yum源为阿里源

由于Cent OS 所自带的yum源,速度不是很快,之前在玩树莓派的时候见识过阿里源的强大,所以决定将其更换为阿里源。

Step 1

备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

进入yum文件夹

cd /etc/yum.repos.d

下载阿里源的文件

wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo	 

安装epel repo源

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

Step 2

清理缓存

yum clean all

重新生成缓存

yum makecache

更新

yum update 
原文地址:https://www.cnblogs.com/AlexKing007/p/12338099.html