CentOS7如何更换yum源
1.首先我们先对系统本身的yum源进行备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载国内yum源配置文件到/etc/yum.repos.d/CentOS-Base.repo
阿里云 CentOS 7 源(推荐):
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.清理yum缓存,并生成新的缓存
yum clean all yum makecache