全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
12
返回列表 发新帖
楼主: xsbw

[经验] centos7停止维护后更换yum源教程

[复制链接]
发表于 2024-7-8 10:13:59 | 显示全部楼层
连wget都安装不了,怎么办呢,

  1. [root@vpstop ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun                                                                                        .com/repo/Centos-7.repo
  2. -bash: wget: command not found
  3. [root@vpstop ~]# yum install wget
  4. Loaded plugins: fastestmirror
  5. Loading mirror speeds from cached hostfile
  6. There are no enabled repos.
  7. Run "yum repolist all" to see the repos you have.
  8. To enable Red Hat Subscription Management repositories:
  9.      subscription-manager repos --enable <repo>
  10. To enable custom repositories:
  11.      yum-config-manager --enable <repo>
复制代码
发表于 2024-7-8 10:37:37 | 显示全部楼层
直接换系统,都结束支持的系统还用干什么。
 楼主| 发表于 2024-7-8 10:52:23 | 显示全部楼层
zhoumo310 发表于 2024-7-8 10:13
连wget都安装不了,怎么办呢,


连接你服务器,进入/etc/yum.repos.d 目录,把原本的CentOS-Base.repo这个文件重命名为CentOS-Base.repo.backup,然后手动下载http://mirrors.aliyun.com/repo/Centos-7.repo ,上传到这个文件夹中,再执行yum clean all和yum makecache就可以了
发表于 2024-8-5 14:44:10 | 显示全部楼层
阿里 腾讯 华为天翼 各种服务器出售.折扣大大的

t    g:@ttww1984
发表于 2024-8-5 15:01:12 | 显示全部楼层
迁移服务器系统到其他的系统才是王道,RockyLinux AnolisOS 之类的
发表于 2024-8-5 15:08:39 | 显示全部楼层
换系统才是正确的
bash <(curl -sSL https://linuxmirrors.cn/main.sh)
发表于 2024-8-5 15:15:52 | 显示全部楼层
蘑菇 发表于 2024-7-7 19:17
bash -c "$(curl -fsSL https://mirror.moack.co.kr/.resource/centos7-change-vault.sh)"

谢谢分享,可以使用
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-16 11:54 , Processed in 0.083218 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表