美文网首页
CentOS7更换镜像下载源

CentOS7更换镜像下载源

作者: 天马行空_9f6e | 来源:发表于2021-02-22 13:47 被阅读0次

1)先安装wget

执行命令 yum install -y wget

2) 查询国内镜像源

打开阿里镜像http://mirrors.aliyun.com/

3)下载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

4)更新镜像源

#清除缓存

yum clean all

#生成缓存

yum makecache

执行命令:yum -y update

更新yum源,等待更新完毕即可。

相关文章

网友评论

      本文标题:CentOS7更换镜像下载源

      本文链接:https://www.haomeiwen.com/subject/fdnhfltx.html