From 117020b8b47e787081b461bd14286b6963f834e7 Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Mon, 11 Aug 2025 12:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=20trixie=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01.PVE系统安装.md | 2 +- 02.PVE初始化配置.md | 3 + 03.PVE系统调整.md | 27 +------- 04.PVE创建模板虚拟机.md | 6 +- 05.PVE制作虚拟机模板.md | 67 +++---------------- 07.PVE制作TS服务器.md | 25 ++++--- .../debian_dns_50unattended_upgrades.conf | 5 +- src/debian/debian_sources.conf | 4 +- src/pve/pve_50unattended_upgrades.conf | 7 +- 9 files changed, 40 insertions(+), 106 deletions(-) diff --git a/01.PVE系统安装.md b/01.PVE系统安装.md index c04b91d..c4dd31b 100644 --- a/01.PVE系统安装.md +++ b/01.PVE系统安装.md @@ -207,7 +207,7 @@ $ cat /etc/fstab $ cat /etc/os-release ``` -此处显示出 PVE 底层使用的是 Debian 的系统,代号为 `bookworm` ,该代号后续会使用到。 +此处显示出 PVE 底层使用的是 Debian 的系统,代号为 `trixie` ,该代号后续会使用到。 ![PVE系统信息](img/p01/pve_sys_info.jpeg) diff --git a/02.PVE初始化配置.md b/02.PVE初始化配置.md index 27a869e..3ddcc99 100644 --- a/02.PVE初始化配置.md +++ b/02.PVE初始化配置.md @@ -185,6 +185,9 @@ $ apt install iftop iperf3 iperf ## 根据 CPU 厂商安装 CPU 微码工具(可选,现已默认安装) $ apt install intel-microcode (amd64-microcode) + +## 刷新 systemd 日志分类索引 +$ journalctl --update-catalog ``` ## 3.配置 PVE 网络 diff --git a/03.PVE系统调整.md b/03.PVE系统调整.md index f0835fc..a3f16a4 100644 --- a/03.PVE系统调整.md +++ b/03.PVE系统调整.md @@ -6,29 +6,6 @@ 关于 [Neovim](https://neovim.io/) 的基础使用方法,请参阅:[Neovim 基础教程](https://cn.bing.com/search?q=Neovim+%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B) 。 -```bash -## 同步镜像仓库 -$ apt update - -## 安装系统软件 -$ apt install btop lm-sensors tmux neovim unzip unattended-upgrades powermgmt-base sshguard - -## 安装 CPU 调度调整工具 -$ apt install linux-cpupower - -## 根据 CPU 厂商安装 CPU 微码工具 -$ apt install intel-microcode (amd64-microcode) - -## 安装 Open vSwitch(可选) -$ apt install openvswitch-switch - -## 安装网络检测工具(可选) -$ apt install iftop iperf3 iperf - -## 更新 PCI 数据库 -$ update-pciids -``` - ## 1.系统时区 如果在安装 PVE 系统时选错了时区,导致系统时间和北京时间不一致,可以执行以下命令修正。 @@ -339,7 +316,7 @@ $ nvim /etc/apt/apt.conf.d/50unattended-upgrades 配置文件中,被修改的参数解释如下: -- 启用了 Debian `bookworm-updates` 相关更新。 +- 启用了 Debian `trixie-updates` 相关更新。 - 增加并启用 PVE 自有仓库的更新。 @@ -370,7 +347,7 @@ $ nvim /etc/apt/apt.conf.d/50unattended-upgrades ## 按需添加 PVE Ceph 更新项目 -"origin=Proxmox,codename=${distro_codename},label=Proxmox Ceph Debian Repository"; +"origin=Proxmox,codename=${distro_codename},label=Proxmox Ceph 19 Squid Debian Repository"; ## 在配置文件末尾增加以下配置项,代表启用,并调整参数 diff --git a/04.PVE创建模板虚拟机.md b/04.PVE创建模板虚拟机.md index d1d0101..a1480d9 100644 --- a/04.PVE创建模板虚拟机.md +++ b/04.PVE创建模板虚拟机.md @@ -6,7 +6,7 @@ 本文将使用 Debian 的云镜像 `debian-12-generic-amd64.qcow2` 作为模板虚拟机的镜像。 -访问 [Debian Official Cloud Images](https://cloud.debian.org/images/cloud/) 官方网站,下载最新版 `Bookworm` 云镜像以及对应的校验文件。 +访问 [Debian Official Cloud Images](https://cloud.debian.org/images/cloud/) 官方网站,下载最新版 `Trixie` 云镜像以及对应的校验文件。 ![下载镜像](img/p04/download_generic_image_qcow2.jpeg) @@ -104,10 +104,10 @@ $ cd /tmp/Debian ```bash ## 下载云镜像校验文件 -$ wget https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS +$ wget https://cloud.debian.org/images/cloud/trixie/latest/SHA512SUMS ## 下载云镜像 -$ wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2 +$ wget https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2 ## 检查文件是否存在 $ ls -lah diff --git a/05.PVE制作虚拟机模板.md b/05.PVE制作虚拟机模板.md index eb7f6e1..2b07043 100644 --- a/05.PVE制作虚拟机模板.md +++ b/05.PVE制作虚拟机模板.md @@ -51,76 +51,26 @@ $ sudo systemctl restart ssh.service 当系统版本发生变化时,请参考 USTC 镜像站的官方说明 [USTC Mirror Help - Debian](https://mirrors.ustc.edu.cn/help/debian.html) 。 -Debian12 云镜像的软件源配置采用了 `DEB822` 格式,新版 `sources.list` 配置文件内容如下。 +使用如下命令对 `debian.sources` 配置文件进行修改。 ```bash -## 查看镜像配置文件 -$ cat /etc/apt/sources.list - -#### 配置文件示例输出 -# See /etc/apt/sources.list.d/debian.sources -``` - -进一步查看新配置文件 `debian.sources` 的内容,其配置包含 `3` 个部分。 - -```bash -## 查看新版镜像配置文件 -$ cat /etc/apt/sources.list.d/debian.sources - -#### 新版配置文件示例输出 (主体部分) -Types: deb deb-src -URIs: mirror+file:///etc/apt/mirrors/debian.list -Suites: bookworm bookworm-updates bookworm-backports -Components: main - -Types: deb deb-src -URIs: mirror+file:///etc/apt/mirrors/debian-security.list -Suites: bookworm-security -Components: main - -## 查看关联的配置文件 -$ cat /etc/apt/mirrors/debian.list - -#### 关联配置文件示例输出 (关联部分 1 ) -https://deb.debian.org/debian - -## 查看关联的配置文件 -$ cat /etc/apt/mirrors/debian-security.list - -#### 关联配置文件示例输出 (关联部分 2 ) -https://deb.debian.org/debian-security -``` - -因此,修改 Debian12 软件源的方式也有两种,本文将尝试使用第 `2` 种修改方案。 - -1. 删除当前软件源配置文件,重新启用常规 `sources.list` 配置文件的配置方案。 - -2. 根据当前软件源配置文件的语法规则,仅修改配置文件。 - -使用 `vim` 编辑器编辑 `debian.sources` 配置文件,执行以下命令。 - -```bash -## 编辑 debian.sources 配置文件 -$ sudo vim /etc/apt/sources.list.d/debian.sources -``` - -删除里面全部内容,添加以下配置项,并保存。 - -```bash -## 系统软件源配置项 +## 配置 Debian 系统默认软件源脚本 +$ sudo cat > /etc/apt/sources.list.d/debian.sources < /etc/apt/sources.list.d/debian.sources < /dev/null +$ curl -fsSL https://pkgs.tailscale.com/stable/debian/trixie.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null ## 添加 TS 软件源 -$ curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list +$ curl -fsSL https://pkgs.tailscale.com/stable/debian/trixie.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list ``` ### 1.3.安装软件 @@ -140,6 +136,9 @@ $ sudo apt install tailscale ## 安装网络检测工具(可选) $ sudo apt install iftop iperf3 iperf +## 刷新 systemd 日志分类索引 +$ sudo journalctl --update-catalog + ## 写入磁盘 $ sudo sync ``` diff --git a/src/debian/debian_dns_50unattended_upgrades.conf b/src/debian/debian_dns_50unattended_upgrades.conf index 1880569..0c4b622 100644 --- a/src/debian/debian_dns_50unattended_upgrades.conf +++ b/src/debian/debian_dns_50unattended_upgrades.conf @@ -31,6 +31,7 @@ Unattended-Upgrade::Origins-Pattern { "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; +// "o=Debian Backports,n=${distro_codename}-backports,l=Debian Backports"; // Archive or Suite based matching: // Note that this will silently match a different release after @@ -39,7 +40,7 @@ Unattended-Upgrade::Origins-Pattern { // "o=Debian,a=stable"; // "o=Debian,a=stable-updates"; // "o=Debian,a=proposed-updates"; -// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; +// "o=Debian Backports,a=stable-backports,l=Debian Backports"; }; // Python regular expressions, matching packages to exclude from upgrading @@ -72,7 +73,7 @@ Unattended-Upgrade::Package-Blacklist { // Split the upgrade into the smallest possible chunks so that // they can be interrupted with SIGTERM. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade +// a bit slower but it has the benefit that shutdown while an upgrade // is running is possible (with a small delay) //Unattended-Upgrade::MinimalSteps "true"; diff --git a/src/debian/debian_sources.conf b/src/debian/debian_sources.conf index ce6f263..8c0eedf 100644 --- a/src/debian/debian_sources.conf +++ b/src/debian/debian_sources.conf @@ -1,12 +1,12 @@ Types: deb URIs: https://mirrors.ustc.edu.cn/debian -Suites: bookworm bookworm-updates +Suites: trixie trixie-updates Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg Types: deb URIs: https://mirrors.ustc.edu.cn/debian-security -Suites: bookworm-security +Suites: trixie-security Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg diff --git a/src/pve/pve_50unattended_upgrades.conf b/src/pve/pve_50unattended_upgrades.conf index 79c95ed..1d3a4ab 100644 --- a/src/pve/pve_50unattended_upgrades.conf +++ b/src/pve/pve_50unattended_upgrades.conf @@ -31,8 +31,9 @@ Unattended-Upgrade::Origins-Pattern { "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; +// "o=Debian Backports,n=${distro_codename}-backports,l=Debian Backports"; "origin=Proxmox,codename=${distro_codename},label=Proxmox Debian Repository"; -// "origin=Proxmox,codename=${distro_codename},label=Proxmox Ceph Debian Repository"; +// "origin=Proxmox,codename=${distro_codename},label=Proxmox Ceph 19 Squid Debian Repository"; // Archive or Suite based matching: // Note that this will silently match a different release after @@ -41,7 +42,7 @@ Unattended-Upgrade::Origins-Pattern { // "o=Debian,a=stable"; // "o=Debian,a=stable-updates"; // "o=Debian,a=proposed-updates"; -// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; +// "o=Debian Backports,a=stable-backports,l=Debian Backports"; }; // Python regular expressions, matching packages to exclude from upgrading @@ -74,7 +75,7 @@ Unattended-Upgrade::Package-Blacklist { // Split the upgrade into the smallest possible chunks so that // they can be interrupted with SIGTERM. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade +// a bit slower but it has the benefit that shutdown while an upgrade // is running is possible (with a small delay) //Unattended-Upgrade::MinimalSteps "true";