ZoyaPatel

一篇文章教你如何配置 Centos 镜像地址 !

SohaniSharma

## centos 虽然centos 下线了,但是任何有用户的需求使用,所以本文整理的相关的镜像配置地址。如何解决各个版本的配置 {alertInfo}
 

由人工编写审核,非AI生成内容,请放心观看!

{getToc} $title={文章目录}

一篇文章教你如何配置 Centos 镜像地址
 一篇文章教你如何配置 Centos 镜像地址

## Centos 下线历史问题

目前的Centos 已经下线了,各大国内厂商也已经开始不对其进行支持了

比如: 阿里巴巴 ,阿里的镜像地址虽然还在,你使用的时候,会发现访问不来。

Base地址:

https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.534d1b11kSKRsN

这是因为关闭了地址了,没有在界面补充说明。

## 配置镜像地址

腾讯云或者清华源地址:

https://mirrors.tencent.com/help/centos.html

https://mirrors.tuna.tsinghua.edu.cn/help/centos-vault/

一篇文章教你如何配置 Centos 镜像地址
 一篇文章教你如何配置 Centos 镜像地址

## 前提说明

目前的各个镜像地址对其支持都不不太完整的。因此,需要的配置不很复杂

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

获取对应版本的 CentOS-Base.repo 到 /etc/yum.repos.d/ 目录

CentOS Linux 7

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tencent.com/repo/centos7_base.repo

CentOS Linux 8

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tencent.com/repo/centos8_base.repo

CentOS Stream 8

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tencent.com/repo/centos8-stream.repo
yum clean all
yum makecache

Base 地址一般会比较简单。

但是我在的配置了以后,发现依然安装不了基本git 这是则么回事呢?

## 配置第二个Valut 源地址

一篇文章教你如何配置 Centos 镜像地址
 一篇文章教你如何配置 Centos 镜像地址


地址:https://mirrors.tuna.tsinghua.edu.cn/help/centos-vault/

档里说的 “需要确定小版本号” 是因为 CentOS 已经 EOL(停止维护),官方不再维护 latest 链接,所以必须指定明确的小版本号目录

对应关系如下:

  • CentOS 5 → 最后小版本是 5.11
  • CentOS 6 → 最后小版本是 6.10
  • CentOS 7 → 最后小版本是 7.9.2009
  • CentOS 8 → 最后小版本是 8.5.2111 ✅(你的情况)

### 如何操作:

  • 登录的清华源地址:填入你的需要大版本的最小版本号,比如:我的是Centos 8 我直接填入 8.5.2111 回车后,下面的代码自动改变
  • 粘贴到命令行,就可以解决。
  • 记得重新下载源数据:yum makecache

## 安装git

sudo dnf install git-all 安装完成。

## stream 版本如何处理呢?

CentOS Stream 9 目前的腾讯还是支持的,而且仅仅支持这一个版本,没有更多的版本了

地址https://mirrors.tencent.com/help/centos-stream.html

## 参考地址:

[1] 腾讯镜像:https://mirrors.tencent.com/

[2] 阿里镜像配置:https://developer.aliyun.com/mirror/

[3] 清华:https://mirrors.tuna.tsinghua.edu.cn/help/centos-vault/

[4] centos office website: https://vault.centos.org/


Ahmedabad
Kolkata
Hyderabad
后一页 Bangalore 前一页

Random Manga

Ads

نموذج الاتصال