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

实用教程 admin 9个月前 (08-20) 374次浏览 0个评论

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 ,或者直接全部复制下面的命令:

cat > /etc/apt/sources.list <<EOF
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
​EOF

更新软件源

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 资源。

配置方法

  • 手动安装 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 包。TOKEN 是由 Freexian 给您的,$CODENAME 可以是 jessie, stretch, buster, bullseye 或 xenial。
    TOKEN 是由 Freexian 公司给您的一个唯一的 URL,用于访问 PHP LTS 服务的软件源。您需要将它替换为您自己的用户名和令牌

作者:lanlandezei
链接:https://ld246.com/article/1689898703808
来源:链滴
协议:CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0/


VPS小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:debian9 stretch 停止支持后如何配置软件源
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址