美文网首页
更改Linux镜像源

更改Linux镜像源

作者: QZH_2019 | 来源:发表于2019-12-26 09:19 被阅读0次

1. 备份原来的镜像文件

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载阿里云镜像repo

  • centos7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  • centos8
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

3. 清除缓存命令

yum clean all
yum makecache

相关文章

网友评论

      本文标题:更改Linux镜像源

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