Centos7更换yum源
#!/bin/bash
result=`yum list wget | grep wget | wc -l`
if [ $result -le 1 ]; then
yum install -y wget
fi
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache

浙公网安备 33010602011771号