1. yum的配置文件在/etc/yum.repos.d/下
  2. 备份Centos-Base.repo cp CentOS-Base.repo CentOS-Base.repo.bk
  3. 然后下载阿里云的yum文件 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  4. 清理缓存 yum makecache
  5. 查看刚才配置的源 yum repolist

附上两个常用的yum文件地址
下载配置文件,加入/etc/yum.repos.d/
阿里镜像:
http://mirrors.aliyun.com/repo/Centos-7.repo
网易镜像:
http://mirrors.163.com/.help/CentOS7-Base-163.repo

相关文章:

  • 2021-10-25
  • 2022-01-09
  • 2021-11-06
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-28
  • 2021-12-06
  • 2021-05-28
  • 2021-08-27
  • 2022-02-07
  • 2022-12-23
  • 2021-09-09
相关资源
相似解决方案