PVE9换源升级 2026-09-23 虚拟化 暂无评论 15 次阅读 PVE 9.0 基于 Debian 13,除了换 Debian 的软件源以外,还需要编辑企业源、Ceph 源、无订阅源以及 CT 模板源。 #Debian 软件源 Debian 13 软件源变更为 `DEB822` 格式 `/etc/apt/sources.list.d/debian.sources` ,不再是传统格式 `/etc/apt/sources.list` 与常规的 Debian 13 一样,将 `/etc/apt/sources.list.d/debian.sources` 中默认源全部删除,将其替换为清华源 ``` vi /etc/apt/sources.list.d/debian.sources ``` ``` Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/debian Suites: trixie trixie-updates trixie-backports Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 # Types: deb-src # URIs: https://mirrors.tuna.tsinghua.edu.cn/debian # Suites: trixie trixie-updates trixie-backports # Components: main contrib non-free non-free-firmware # Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 Types: deb URIs: https://security.debian.org/debian-security Suites: trixie-security Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg # Types: deb-src # URIs: https://security.debian.org/debian-security # Suites: trixie-security # Components: main contrib non-free non-free-firmware # Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg ``` #企业源 将 PVE 的企业源 `/etc/apt/sources.list.d/pve-enterprise.sources` 注释掉(也可以直接删除) ``` vi /etc/apt/sources.list.d/pve-enterprise.sources ``` ``` # Types: deb # URIs: https://enterprise.proxmox.com/debian/pve # Suites: trixie # Components: pve-enterprise # Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg ``` #Ceph 源 将 PVE 的 Ceph 源 `/etc/apt/sources.list.d/ceph.sources` 也替换成清华源 ``` vi /etc/apt/sources.list.d/ceph.sources ``` ``` Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/ceph-squid Suites: trixie Components: no-subscription Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg ``` #无订阅源 在 `/etc/apt/sources.list.d` 目录下创建 `pve-no-subscription.sources` 文件,填上以下内容 ``` # 删除错误的旧配置文件 rm /etc/apt/sources.list.d/pve-no-subscription.list cd /etc/apt/sources.list.d touch pve-no-subscription.sources vi pve-no-subscription.sources ``` 填入下面的内容 ``` Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve Suites: trixie Components: pve-no-subscription Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg ``` 从新的官方源 (deb.debian.org) 下载列表 # 1. 从新的官方源 (deb.debian.org) 下载列表 ``` apt-get update ``` # 2. 更新系统 ``` apt-get upgrade ``` #CT 模板源 如果你需要用到 PVE 中的 LXC 容器,那么还需要替换一下 CT 模板源,否则下载模板会非常的慢 将 `/usr/share/perl5/PVE/APLInfo.pm` 文件中默认的源地址 `http://download.proxmox.com` 替换为`https://mirrors.tuna.tsinghua.edu.cn/proxmox` 可以使用如下命令修改,重启后生效 ``` cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm_back sed -i 's|http://download.proxmox.com|https://mirrors.tuna.tsinghua.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm ``` 优化完毕后进行系统安装 转自https://www.cnblogs.com/zqingyang/p/19221794 标签: PVE 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。