centos8 更换为阿里源

https://blog.csdn.net/xiaocao_debug/article/details/123041407


cd /etc/yum.repos.d/ && mkdir backup && mv *repo backup/ 

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

sed -i -e "s|mirrors.cloud.aliyuncs.com|mirrors.aliyun.com|g " /etc/yum.repos.d/CentOS-*
sed -i -e "s|releasever|releasever-stream|g" /etc/yum.repos.d/CentOS-*

yum clean all && yum makecache

Copyright © Your Website 2021