CentOS7更换镜像源
1、先安装wget
yum install -y wget
点击,帮助,查看详情:
2、下载CentOS 7的对应的repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、更新镜像源
yum clean all
yum makecache
yum -y update
执行完上面三行命令就好了
本文链接:https://blog.runxinyun.com/post/359.html 转载需授权!
留言0