diff --git a/02.PVE初始化配置.md b/02.PVE初始化配置.md index f1b0c1c..664ed75 100644 --- a/02.PVE初始化配置.md +++ b/02.PVE初始化配置.md @@ -16,76 +16,90 @@ ```bash ## 进入系统软件源配置目录 -$ cd /etc/apt +$ cd /etc/apt/sources.list.d ## 查看系统默认镜像配置 -$ cat sources.list - -## 将默认软件源配置文件进行备份 -$ cp sources.list sources.list.bak +$ cat debian.sources ``` 系统默认镜像配置记录如下。 ```bash -deb http://ftp.debian.org/debian bookworm main contrib +Types: deb +URIs: http://deb.debian.org/debian/ +Suites: trixie trixie-updates +Components: main contrib non-free-firmware +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg -deb http://ftp.debian.org/debian bookworm-updates main contrib - -# security updates -deb http://security.debian.org bookworm-security main contrib +Types: deb +URIs: http://security.debian.org/debian-security/ +Suites: trixie-security +Components: main contrib non-free-firmware +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg ``` -这里我将使用 [中国科技大(USTC)](http://mirrors.ustc.edu.cn/help/proxmox.html) 的镜像仓库进行替换,使用如下命令。 - -**注意:该命令为两行,在输入时请逐行输入并回车执行。** +这里将使用 [中国科技大(USTC)](http://mirrors.ustc.edu.cn/help/proxmox.html) 的镜像仓库进行替换,使用如下命令。 ```bash -## 替换系统软件仓库 +## 配置 PVE 系统默认软件源脚本 -$ sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list +cat > /etc/apt/sources.list.d/debian.sources < /etc/apt/sources.list.d/pve-no-subscription.sources < /etc/apt/sources.list.d/pve-no-subscription.list ``` -对于 Proxmox Backup Server 和 Proxmox Mail Gateway,请将以上命令中的 `pve` 分别替换为 `pbs` 和 `pmg` 。 +对于 Proxmox Backup Server 和 Proxmox Mail Gateway,请将以上命令路径中的 `pve` 分别替换为 `pbs` 和 `pmg` 。 -进一步创建 PVE Ceph 免费软件源,Ceph 软件源为 PVE 8 之后默认安装,执行以下命令。 +进一步创建 PVE Ceph 免订阅软件源,Ceph 软件源为 PVE 8 之后默认安装,执行以下命令。 ```bash -## 创建 PVE Ceph 免费软件源脚本 +## 配置 PVE Ceph 免订阅软件源脚本 -if [ -f /etc/apt/sources.list.d/ceph.list ]; then +if [ -f /etc/apt/sources.list.d/ceph.sources ]; then CEPH_CODENAME=`ceph -v | grep ceph | awk '{print $(NF-1)}'` source /etc/os-release - echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-$CEPH_CODENAME $VERSION_CODENAME no-subscription" > /etc/apt/sources.list.d/ceph-no-subscription.list + cat > /etc/apt/sources.list.d/ceph-no-subscription.sources <