下载wget

yum install wget

打开xshell,查看yum源信息:

yum repolist

跳转base reop源:

cd /etc/yum.repos.d

备份旧的配置文件:

mv CentOS-Base.repo CentOS-Base.repo.bak

下载基础源文件(阿里云):

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

下载扩展源文件(epel----企业版linux的额外软件包):

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

清理缓存:

yum clean all

重新生成缓存:

yum makecache

再次查看yum源信息:

yum repolist

相关文章:

  • 2021-12-04
  • 2021-11-28
  • 2021-11-22
  • 2021-11-20
  • 2021-11-14
  • 2021-09-08
猜你喜欢
  • 2021-11-04
  • 2021-12-14
相关资源
相似解决方案