CentOS修改源
使用阿里云源
Section titled “使用阿里云源”# 备份原有源sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下载阿里云源sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 清理并重建缓存sudo yum clean allsudo yum makecache# 备份原有源sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下载清华源sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tuna.tsinghua.edu.cn/help/centos/centos7.repo
# 清理并重建缓存sudo yum clean allsudo yum makecache© 2025-2026 LiuXing. All Rights Reserved.