更新CentOS默认yum源/镜像源为mirrors.aliyun.com
1、首先备份系统自带的yum源配置文件 /etc/yum.repos.d/CentOS-Base.repo
在进行此类更改时候,先对系统默认源文件进行备份,备份是一个很好的习惯,此处如果权限不够,就使用root权限
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、进入yum源配置文件所在的文件夹
cd /etc/yum.repos.d/
3、下载aliyun的yum源配置文件到/etc/yum.repos.d/
CentOS 7:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4、运行yum makecache生成缓存
yum makecache
5、更新系统
yum -y update标签:CentOS,mirrors,源为,repos,repo,etc,yum,aliyun From: https://www.cnblogs.com/yaoyaojcy/p/17139639.html