CentOS7 修改yum源为阿里云

  1. 切换到yum源目录
cd /etc/yum.repos.d
  1. 备份原来的yum源文件
mv CentOS-Base.repo CentOS-Base.repo.bak
  1. 从阿里云下载centos7的源文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 重建缓存
yum clean all

yum makecache
  1. 更新yum源
yum update

猜你喜欢

转载自blog.csdn.net/m0_37779570/article/details/82120869