CentOS 7如何更换yum镜像源为阿里云

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/redsoft_mymuch/article/details/86085224
  • 切换到/etc/yum.repos.d下
  • 使用命令:wget http://mirrors.aliyun.com/repo/Centos-7.repo下载阿里云的资源文件

如果没有wget工具,可以使用yum -y install wget下载安装

  • 使用命令:mv CentOS-Base.repo CentOS-Base.repo.bak 备份既有的配置文件
  • 使用命令:mv Centos-7.repo CentOS-Base.repo 把下载的文件重命名。

  • 然后依次执行下面的命令。

yum clean all

yum makecache

yum update

猜你喜欢

转载自blog.csdn.net/redsoft_mymuch/article/details/86085224