linux Centos 更换 阿里云 yum源

1. 备份原有 yum 源

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

2. 下载新的 yum 源

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

3. 建立缓存

  • 清除缓存
yum clean all
  • 新建缓存
yum makecache
发布了13 篇原创文章 · 获赞 2 · 访问量 476

猜你喜欢

转载自blog.csdn.net/RunzIyy/article/details/104626489