1、备份原有的 yum 源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

 

2、下载阿里 yum 源配置文件(CentOS7)

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

 

3、生成缓存

yum makecache

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-06-03
  • 2021-12-06
  • 2021-05-27
  • 2022-01-16
  • 2021-11-10
猜你喜欢
  • 2021-05-15
  • 2021-12-11
  • 2021-12-23
  • 2022-12-23
  • 2021-10-02
  • 2021-09-27
  • 2022-12-23
相关资源
相似解决方案