历史方法:
echo ‘========== 更新配置YUM ============’;
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo && wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo
cd /etc/yum.repos.d/
sed -i 's/$releasever/6/g' CentOS-Base.repo
sed -i 's/$basearch/x86_64/g' CentOS-Base.repo
sed -i 's/$basearch/x86_64/g' epel-6.repo
yum clean all && yum makecache fast
当前新方法
echo ‘========== 更新配置YUM ============’;
wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo
yum clean all && yum makecache fast