# yum源配置脚本
#!/bin/bash
mkdir /etc/yum.repos.d/backup
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup
cat > /etc/yum.repos.d/base.repo <<EOF
[base]
name=base
baseurl=https://mirrors.aliyun.com/centos/$releasever/os/$basearch
gpgcheck=0
[extras]
baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch
gogcheck=0
[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/$releasever/$basearch/
gpgcheck=0
EOF