Centos7最小化安装更换yum阿里源
0.安装wget
yum -y install wget
1.首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载国内yum源配置文件到/etc/yum.repos.d/
阿里源(推荐):
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.清理yum缓存,并生成新的缓存
yum clean all
yum makecache
4.更新yum源检查是否生效
yum update