Centos7.3修改yum源为阿里云yum源

徘徊边缘 提交于 2020-02-07 03:37:40
  • yum源的位置在 /etc/yum.repos.d 下,Centos-Base.repo为yum源配置文件
    在这里插入图片描述
  • 备份原来的yum文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
  • 下载阿里云的 CentOS-Base.repo 到/etc/yum.repos.d/
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
  • 清空原本yum缓存
yum clean all
  • 生成新的阿里云的yum缓存,加速下载预热数据
yum makecache
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!