CentOS 8 配置阿里云yum源

下载repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo


匹配发行版本

sed -i 's/$releasever/8/g' /etc/yum.repos.d/CentOS-Base.repo


清理 Yum 缓存

yum clean all


重新生成缓存

yum makecache