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

打印 上一主题 下一主题

主题 1549|帖子 1549|积分 4647

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
众所周知,CentOS 7 在2024年6月30号以后,官方就不再维护了,而且未来也不会出现9、10之类的版本,而是用CentOS 8做前置版本,出了一个新的体系。之前版本的许多yum源也陆续关掉了,如今不消阿里源就会直接报404,,这点就很不友爱。
换源第一步:备份原来的repo文件,实在你可以直接删掉了,官方都关闭支持了,留着也没太大作用
  1. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
复制代码
第二步:下载阿里源,如果你换晚了,而且还没有yum上wget,浏览器访问路径可以直接下载,上传到节点就行
  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  2. wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
复制代码
最后刷新一下就行
  1. yum makecache
复制代码
重点说一下,别一看到拒绝毗连就ctrl+C!!!!!!!!!!!!!!!!人家有其他备用的阿里云镜像,出现第一个就自己结束了,然后di我说不能用,我也是服了
  1. [root@hdp1 yum.repos.d]# yum makecache
  2. 已加载插件: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                                                                完毕!
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

冬雨财经

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表