Centos7 更换源

查看源

yum repolist
yum repolist all

更换源

  1. 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
  1. 下载源

把新的源CentOS-Base.repo下载到到/etc/yum.repos.d/

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 生成缓存
yum makecache

猜你喜欢

转载自blog.csdn.net/Z_Z_W_/article/details/104714027