更换之前确保自己安装wget

yum list wget
若没有安装:
yum -y install wget

首先备份原版/etc/yum.repos.d/CentOS-Base.repo

cd /etc/yum.repos.d
sudo mv CentOS-Base.repo CentOS-Base.repo.bak

下载阿里的yum源配置文件,放入/etc/yum.repos.d/CentOS-Base.repo

sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

运行yum makecache生成缓存

yum clean all
yum makecache

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2022-12-23
  • 2021-12-06
  • 2021-05-27
  • 2021-12-15
  • 2021-11-15
  • 2021-10-25
相关资源
相似解决方案