当前位置:首页 » 《资源分享》 » 正文

CentOS 7官方停止维护,OP们记得更换阿里yum源呦

28 人参与  2024年10月27日 12:00  分类 : 《资源分享》  评论

点击全文阅读


众所周知,CentOS 7 在2024年6月30号以后,官方就不再维护了,而且未来也不会出现9、10之类的版本,而是用CentOS 8做前置版本,出了一个新的体系。之前版本的很多yum源也陆续关掉了,现在不用阿里源就会直接报404,,这点就很不友好。

换源第一步:备份原来的repo文件,其实你可以直接删掉了,官方都关闭支持了,留着也没太大作用

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

第二步:下载阿里源,如果你换晚了,而且还没有yum上wget,浏览器访问路径可以直接下载,上传到节点就行

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

最后刷新一下就行

yum makecache

重点说一下,别一看到拒绝连接就ctrl+C!!!!!!!!!!!!!!!!人家有其他备用的阿里云镜像,出现第一个就自己结束了,然后di我说不能用,我也是服了

[root@hdp1 yum.repos.d]# yum makecache已加载插件:fastestmirrorhttp://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; 拒绝连接"正在尝试其它镜像。http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirrors.cloud.aliyuncs.com:80; 拒绝连接"正在尝试其它镜像。base                                                              | 3.6 kB  00:00:00     extras                                                            | 2.9 kB  00:00:00     updates                                                           | 2.9 kB  00:00:00     (1/8): extras/7/x86_64/primary_db                                 | 253 kB  00:00:00     (2/8): extras/7/x86_64/filelists_db                               | 305 kB  00:00:00     (3/8): extras/7/x86_64/other_db                                   | 154 kB  00:00:00     (4/8): base/7/x86_64/other_db                                     | 2.6 MB  00:00:03     (5/8): updates/7/x86_64/filelists_db                              |  15 MB  00:00:08     (6/8): base/7/x86_64/filelists_db                                 | 7.2 MB  00:00:09     (7/8): updates/7/x86_64/other_db                                  | 1.6 MB  00:00:00     (8/8): updates/7/x86_64/primary_db                                |  27 MB  00:00:11     Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com元数据缓存已建立[root@hdp1 yum.repos.d]# yum install -y unzip已加载插件:fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com软件包 unzip-6.0-24.el7_9.x86_64 已安装并且是最新版本无须任何处理[root@hdp1 oozie-4.0.0-cdh5.3.6]# yum install -y zip已加载插件:fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com正在解决依赖关系--> 正在检查事务---> 软件包 zip.x86_64.0.3.0-11.el7 将被 安装--> 解决依赖关系完成依赖关系解决========================================================================================= Package          架构                版本                       源                 大小=========================================================================================正在安装: zip              x86_64              3.0-11.el7                 base              260 k事务概要=========================================================================================安装  1 软件包总下载量:260 k安装大小:796 kDownloading packages:zip-3.0-11.el7.x86_64.rpm                                         | 260 kB  00:00:00     Running transaction checkRunning transaction testTransaction test succeededRunning transaction  正在安装    : zip-3.0-11.el7.x86_64                                                1/1   验证中      : zip-3.0-11.el7.x86_64                                                1/1 已安装:  zip.x86_64 0:3.0-11.el7                                                                完毕!

点击全文阅读


本文链接:http://zhangshiyu.com/post/178491.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1