一元网络论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 147|回复: 0

Guides on switching Yum repositories after CentOS 7 reaches end of life support

[复制链接]

2万

主题

2万

帖子

6万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
60939
发表于 2024-7-9 09:43:40 | 显示全部楼层 |阅读模式
Recently, many friends have been asking why centos7 cannot download environment. Here I will explain to you,
centos7 has ended its lifecycle on June 30th, 2024, and the official no longer provides support and maintenance for maintenance, if you use the official yum source to download environment services, it will report 404.
This article provides available yum sources and configuration tutorials, which are very simple. After connecting to the server via SSH, according to the tutorial steps executed successfully.
1. Backup current Yum source Before switching to a new Yum source, it is recommended to backup the current Yum source configuration file in advance. Execute the following command:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
This will back up the current Yum source configuration file as CentOS-Base.repo.bak.
2. Download new Yum source configuration file

ol>
  • wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    [/ol]

    Here we download the CentOS7 yum source from Aliyun Mirror.
    3. Clear Yum cache

    ol>
  • yum clean all

    4. Generate new cache

    ol>
  • yum makecache

    The tutorial ends here. Now you can execute yum commands to test whether it can normally download environment.
  • 回复

    使用道具 举报

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

    本版积分规则

    Archiver|手机版|小黑屋|一元网络论坛

    GMT+8, 2024-9-29 09:25 , Processed in 0.089091 second(s), 20 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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