1、先安装wget,执行命令:"yum install -y wget"。

CentOS 7更换镜像源

 

 2、打开阿里镜像:https://developer.aliyun.com/mirror/

CentOS 7更换镜像源

 

3、下载新的 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

CentOS 7更换镜像源

 

4、更新镜像源。

#清除缓存
yum clean all
#生成缓存
yum makecache

CentOS 7更换镜像源CentOS 7更换镜像源

 

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-12-31
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2021-11-12
  • 2021-06-20
  • 2021-12-03
  • 2021-11-06
  • 2022-12-23
相关资源
相似解决方案