rm -rf /etc/yum.repos.d/* wget -O /etc/yum.repos.d/CentOS-cnnic.repo https://feieryun.oss-cn-zhangjiakou.aliyuncs.com/linux/etc/yum.repos.d/CentOS-cnnic.repo
這里是阿里雲的源
wget -O /etc/yum.repos.d/CentOS-aliyun.repo http://mirrors.aliyun.com/repo/Centos-8.repo
安裝EPEL的方法,首先正常安裝源
yum install epel-release
也可以是這樣
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
但EPEL安裝之后,還需要批量替換源站(重點在這里)
sed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel* sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
