解决CentOS 7停止更新支持后yum源失效

众归云 服务器知识169阅读模式

最近CentOS 7已经停止更新支持,同时官方也把yum源删除了,目前CentOS 7系统使用yum命令安装软件包提示“Could not resolve host: mirrorlist.centos.org; Unknown error”,因此需要更换yum源。

在ssh界面执行以下命令即可更换yum源为CentOS的Vault源(包括CentOS官方和阿里云的源):

wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.cccyun.cn/repo/Centos-7.repo
yum makecache

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.cccyun.cn/repo/Centos-7.repo
yum makecache

本文来自网络,不代表王道测评立场,如有争议请发邮件:enofun@foxmail.com

AD:【本站QQ交流群】114135944

众归云
  • 本文来自网络,不代表王道测评立场,转载请注明出处
  • 转载请务必保留本文链接:http://www.20115.net/528.html