# 验证网络
ping mirrors.aliyun.com
# 备份CentOS 7系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo命令:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 安装wget
yum install -y wget
# 下载CentOS 7的repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 清理
yum clean all
# 缓存
yum makecache
# 更新
yum update
centos7切阿里云源
最新推荐文章于 2024-06-19 10:50:20 发布