Akiraka Akiraka
  • Home
  • Linux
    • ELK
    • PHP
    • Shell
    • Nginx
    • Docker
      • Docker Compose
    • Centos
    • Ubuntu
    • Jenkins
  • Python
  • Mac OS
  • Windows
  • Big Data
    • Hadoop
    • CDH
    • Hive
    • Spark
    • ZooKeeper
  • K8S
    • Kubernetes
    • Helm
  • Other
  • Quark
  • Contribute
  • Home
  • Linux
    • ELK
    • PHP
    • Shell
    • Nginx
    • Docker
      • Docker Compose
    • Centos
    • Ubuntu
    • Jenkins
  • Python
  • Mac OS
  • Windows
  • Big Data
    • Hadoop
    • CDH
    • Hive
    • Spark
    • ZooKeeper
  • K8S
    • Kubernetes
    • Helm
  • Other
  • Quark
  • Contribute
首页 Linux Centos Cenos 6.x yum 源过期替换问题 尝试其他镜像

Cenos 6.x yum 源过期替换问题 尝试其他镜像

Akiraka 1年前

文章目录

  • 一、原因
    • 1.1、解决方法
    • 1.2、修改好的 yum 源

一、原因

2020年11月30日CentOS 6 EOL。按照社区规则
CentOS 6的源地址 http://mirror.centos.org/centos-6/内容已移除
目前第三方的镜像站(阿里云和163)中均已移除CentOS 6的源。
阿里云的源 http://mirrors.cloud.aliyuncs.com和 http://mirrors.aliyun.com也无法同步到CentOS 6的源。

1.1、解决方法

# 查看系统版本
[root@aka]# cat /etc/redhat-release
CentOS Linux release 6.9.2003 (Core)

# 编辑 yum 文件
vim /etc/yum.repos.d/CentOS-Base.repo
# 将文件中的 $releasever 替换成你 centos 的具体版本。
# 更新
yum clean all
yum makecache

1.2、修改好的 yum 源

# 有需要直接复制黏贴执行即可
cat > /etc/yum.repos.d/CentOS-Base.repo << EOF
[base]
name=CentOS-6.9 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.9/os/$basearch/
        http://mirrors.aliyuncs.com/centos-vault/6.9/os/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos-vault/6.9/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-6.9 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.9/updates/$basearch/
        http://mirrors.aliyuncs.com/centos-vault/6.9/updates/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos-vault/6.9/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.9 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.9/extras/$basearch/
        http://mirrors.aliyuncs.com/centos-vault/6.9/extras/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos-vault/6.9/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.9 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.9/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos-vault/6.9/centosplus/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos-vault/6.9/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.9 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.9/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos-vault/6.9/contrib/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos-vault/6.9/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
EOF

# 更新
yum clean all
yum makecache
#centos#linux
1
猜你喜欢
  • Jenkins 升级失败
  • Deepin与UOS多屏显示输出问题
  • SonarQube 集成 GitLab 单点登录
  • Linux Centos/Ubuntu/Debain配置账户登录失败锁定策略
  • Linux systemd-resolve占用53端口的解决方法
评论 (0)
请登录以参与评论。
立即登录
    暂无评论
Akiraka
站长
本人擅长 Ai、Au、Fl、Ae、Pr、Ps 等软件的安装与卸载,精通 CSS、JavaScript、PHP、Python、Shell、Go 等单词的拼写,熟悉 Windows、Linux、Mac、Android、IOS 等系统的开关机!
160
文章
24
评论
73
获赞
Popular Articles
TOP1
Kubernetes(k8s)Helm 部署 EFK 集群
2年前
TOP2
Kubernetes(k8s)helm 搭建 prometheus + Grafana 监控
2年前
TOP3
Container 命令ctr、crictl 命令使用说明
11月前
TOP4
Kubernetes(k8s)Helm 部署 Jenkins 持续化集成部署
2年前
TOP5
Helm 部署 Loki 日志聚合
2年前
Related Articles
Grafana 容器编排
2年前
RedHat 代替 Docker 使用 Buildah 构建镜像,推送,登录等使用教程
9月前
ubuntu 搭建NFS服务
2年前
RabbitMQ 非官方镜像搭建
2年前
xtrabackup 备份脚本
12月前
Copyright © 2019-2022 Akiraka. 沪18036911号