最近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
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.cccyun.cn/repo/Centos-7.repo
解决CentOS Stream 8停止更新后无法使用yum命令。
在ssh界面执行以下命令即可更换yum源为CentOS的Vault源:
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
亲爱的用户,您好!
活动一
活动二
② 特惠年付机器,今晚00点准时下架
筹备中:
① 免费云服务器活动预热中.....
② 越南 母鸡正在部署中ing
③ 马来西亚 母鸡正在部署中ing
·有问题请及时提交工单随时在线,您可从用户中心发起!
下单须知:下单前请跟客服沟通清楚,特价与活动款一经下单不退不换。
感谢您的理解与支持!
QQ群不定时免费抽云服务器,欢迎加群