1.首先对自带的官方源进行备份

      [[email protected]~]# cd /etc/yum.repos.d
      [[email protected] yum.repos.d]# cp CentOS-Base.repo CentOS-Base.repo.bak

2.找到对应版本的repo
阿里镜像地址: http://mirrors.aliyun.com/
网易镜像站:http://mirrors.163.com/
搜狐镜像站:http://mirrors.sohu.com/

以阿里为例
进入镜像站找到centos 点开后面的帮助
Centos更换国内yum源
之后复制对应版repo的下载链接(以centos7为例)

Centos更换国内yum源
3.在虚拟机上下载
Centos更换国内yum源
4.清理yum并生成缓存

               [[email protected] yum.repos.d]# yum clean all
               [[email protected] yum.repos.d]# yum makecache

相关文章:

  • 2021-09-24
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2022-02-22
  • 2021-12-19
  • 2022-02-20
  • 2022-02-07
  • 2022-02-10
相关资源
相似解决方案