debian9 stretch 停止支持后如何配置软件源

本贴最后更新于 281 天前,其中的信息可能已经时移世改

debian.png

Debian 长期支持 (LTS) 团队宣布 Debian 9(“stretch”)“已于 2022 年 7 月 1 日结束生命周期,距 2017 年 6 月 17 日首次发布已有五年”

Debian LTS 长期支持列表

现在用 debian9 之前的软件源发现都失效了,还想继续用 Debian 9 该如何配置软件源呢。

1.使用 archive 源

官网地址 http://archive.debian.org/

编辑 /etc/apt/sources.list 输入

deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free

deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
deb-src http://archive.debian.org/debian/ stretch-backports main contrib non-free

deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free

更新软件源

apt update

软件源说明

  • deb http://archive.debian.org/debian/ stretch main contrib non-freedeb-src http://archive.debian.org/debian/ stretch main contrib non-free 是 Debian 9 (stretch) 的官方软件源,包含了 Debian 9 发布时的所有软件包,以及后续的一些更新。
  • deb 表示二进制包,
  • deb-src 表示源码包。
  • main 表示符合 Debian 自由软件指导原则的软件包,
  • contrib 表示依赖于非自由软件包的自由软件包,
  • non-free 表示不符合 Debian 自由软件指导原则的软件包。
  • deb http://archive.debian.org/debian/ stretch-backports main contrib non-freedeb-src http://archive.debian.org/debian/ stretch-backports main contrib non-free 是 Debian 9 (stretch) 的 backports 软件源,包含了从 Debian 10 (buster) 中移植过来的一些更新的软件包。这些软件包通常需要手动安装,并且可能与 Debian 9 中的其他软件包不兼容。使用 backports 软件源时,需要谨慎选择。
  • deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-freedeb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free 是 Debian 9 (stretch) 的安全更新软件源,包含了 Debian 安全团队和 Debian LTS 团队发布的一些针对重要漏洞的修复。这些软件源是为了保护您的系统安全而必须启用的。(已于2022 年 7 月 1 日停止更新)

2.其他 archive 源

例如我用的这个地址 https://mirror.xtom.com/debian-archive/ 就改下前面地址就可以了

有些 debian-security 路径不一样需要根据软件源实际情况调整

deb https://mirror.xtom.com/debian-archive/debian/ stretch main contrib non-free
deb-src https://mirror.xtom.com/debian-archive/debian/ stretch main contrib non-free

deb https://mirror.xtom.com/debian-archive/debian/ stretch-backports main contrib non-free
deb-src https://mirror.xtom.com/debian-archive/debian/ stretch-backports main contrib non-free

deb https://mirror.xtom.com/debian-archive/debian-security/ stretch/updates main contrib non-free
deb-src https://mirror.xtom.com/debian-archive/debian-security/ stretch/updates main contrib non-free

https 无法更新可以安装这个软件包 apt install apt-transport-https

国内源

有些没有 debian-archive 源的就没有列出了

https://mirrors.aliyun.com/debian-archive/debian/  # 阿里云
https://mirrors.163.com/debian-archive/debian/  #网易
https://mirrors.cloud.tencent.com/debian-archive/debian/ # 腾讯云
https://mirrors.huaweicloud.com/debian-archive/debian/ # 华为云
https://mirror.nju.edu.cn/debian-archive/debian/ # 南京大学

香港
http://ftp.hk.debian.org/debian-archive/debian/
https://mirror.xtom.com.hk/debian-archive/debian/

网易

deb http://mirrors.163.com/debian-archive/debian/ stretch main contrib non-free
deb-src http://mirrors.163.com/debian-archive/debian/ stretch main contrib non-free

deb http://mirrors.163.com/debian-archive/debian/ stretch-backports main contrib non-free
deb-src http://mirrors.163.com/debian-archive/debian/ stretch-backports main contrib non-free

deb http://mirrors.163.com/debian-archive/debian-security/ stretch/updates main contrib non-free
deb-src http://mirrors.163.com/debian-archive/debian-security/ stretch/updates main contrib non-free

3.ETLS 长期扩展支持

这个 ETLS 扩展支持是收费的,不过经测试使用官方的教程配置好也能获得更新

另一个 PHP LTS 长期支持存储库就需要收费了

延长长期支持 (ELTS) 是一项商业产品,旨在将 Debian 版本的生命周期进一步延长至 10 年(即 LTS 项目提供的 5 年之后的 5 个补充年)。它不是官方的 Debian 项目。不涉及 Debian 的基础设施和其他 Debian 资源。
image.png

配置方法

  • 手动安装 freexian-archive-keyring 包,
wget https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb && dpkg -i freexian-archive-keyring_2022.06.08_all.deb
  • 手动获取密钥文件
wget https://deb.freexian.com/extended-lts/archive-key.gpg -O /etc/apt/trusted.gpg.d/freexian-archive-extended-lts.gpg
  • 在 APT 中配置软件源并安装 freexian-archive-keyring 包
apt install --allow-unauthenticated freexian-archive-keyring

编辑 /etc/apt/sources.list 输入

deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free
deb http://deb.freexian.com/extended-lts stretch main contrib non-free
apt update
  • deb http://deb.freexian.com/extended-lts $CODENAME-lts main contrib non-free 这个地址只包含安全更新,不包含 Debian 的所有软件包。$CODENAME 可以是 jessie 或 stretch。
  • deb http://deb.freexian.com/extended-lts $CODENAME main contrib non-free 这个地址包含了 Debian 的所有软件包和安全更新。$CODENAME 可以是 jessie 或 stretch。

PHP 收费的

  • deb http://php.freexian.com/c/$USERNAME-$TOKEN $CODENAME main 这个地址是针对 PHP LTS 服务的,提供了从 Debian 10 (buster) 或 Debian 11 (bullseye) 中移植过来的 PHP 包。USERNAME 和 TOKEN 是由 Freexian 给您的,$CODENAME 可以是 jessie, stretch, buster, bullseye 或 xenial。
    USERNAME-TOKEN 是由 Freexian 公司给您的一个唯一的 URL,用于访问 PHP LTS 服务的软件源。您需要将它替换为您自己的用户名和令牌
  • Debian
    12 引用 • 4 回帖 • 1 关注

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...