CentOS7设置阿里镜像源

1、安装wget
yum install -y wget

2、下载CentOS7版本的.repo文件
//备份原文件
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

//下载新文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、更新yum
yum update

4、重启系统
reboot

posted @ 2021-12-13 11:02  有梦的秋天  阅读(345)  评论(0编辑  收藏  举报