CentOS修改yum源为Aliyun

阿里云官网yum源http://mirrors.aliyun.com
选择适合自己系统的版本
选择 centos -- 帮助

1、备份系统自带的yum源 的 base.repo和epel.repo

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

2、下载和自己操作系统版本对应的yum源

[root@ ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

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

猜你喜欢

转载自blog.51cto.com/zhanjun/2170527