 **适用于Proxmox VE 9.x(基于 Debian trixie)** --- # 一、系统初始化检查 **登录后先确认版本:** ``` pveversion -v ``` **检查网络是否正常:** ``` ping -c 4 8.8.8.8 ``` --- # 二、配置软件源(关键步骤) ## 1️⃣ 说明 **PVE 默认启用了****企业订阅源(enterprise)**: * **❗未购买订阅时会报错(401 Unauthorized)** * **❗影响 **`apt update` 体验 **👉 因此建议切换为 ****no-subscription 源** --- ## 2️⃣ 添加非订阅源 ``` echo "deb http://download.proxmox.com/debian/pve trixie pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list ``` --- ## 3️⃣ 禁用企业源 ``` sed -i 's/^deb/# deb/g' /etc/apt/sources.list.d/pve-enterprise.list 2>/dev/null ``` --- # 三、替换镜像 ## 1️⃣ 推荐镜像 * **中科大:**[https://mirrors.ustc.edu.cn/help/proxmox.html](https://mirrors.ustc.edu.cn/help/proxmox.html) * **清华:**[https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/](https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/) --- ## 2️⃣ 替换 Proxmox 源 ``` echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve trixie pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list ``` --- ## 3️⃣ 替换 Debian 源 ``` deb https://mirrors.ustc.edu.cn/debian trixie main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian trixie-updates main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware ``` --- ## 4️⃣ (可选)CT 模板加速 ``` sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm ``` --- ## 5️⃣ 更新软件索引 ``` apt update ``` --- # 四、系统更新 ``` apt full-upgrade -y apt autoremove --purge -y ``` --- # 五、关闭订阅提示(优化 UI) ``` sed -i "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js systemctl restart pveproxy ``` --- # 六、常用优化(推荐) ## 时间同步 ``` timedatectl set-timezone Asia/Shanghai timedatectl set-ntp true ``` --- ## 开启 IOMMU(直通必备) ``` nano /etc/default/grub ``` **添加:** ``` intel_iommu=on ``` **或 AMD:** ``` amd_iommu=on ``` ``` update-grub reboot ``` --- # 七、常见问题 ## 更新慢 **👉 使用国内镜像** ## Web UI 无法访问 ``` systemctl restart pveproxy systemctl restart pvedaemon ``` ## apt 报错 ``` apt --fix-broken install dpkg --configure -a ``` --- # 八、升级总结(三步法) ``` apt update apt full-upgrade -y reboot ``` Loading...  **适用于Proxmox VE 9.x(基于 Debian trixie)** --- # 一、系统初始化检查 **登录后先确认版本:** ``` pveversion -v ``` **检查网络是否正常:** ``` ping -c 4 8.8.8.8 ``` --- # 二、配置软件源(关键步骤) ## 1️⃣ 说明 **PVE 默认启用了****企业订阅源(enterprise)**: * **❗未购买订阅时会报错(401 Unauthorized)** * **❗影响 **`apt update` 体验 **👉 因此建议切换为 ****no-subscription 源** --- ## 2️⃣ 添加非订阅源 ``` echo "deb http://download.proxmox.com/debian/pve trixie pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list ``` --- ## 3️⃣ 禁用企业源 ``` sed -i 's/^deb/# deb/g' /etc/apt/sources.list.d/pve-enterprise.list 2>/dev/null ``` --- # 三、替换镜像 ## 1️⃣ 推荐镜像 * **中科大:**[https://mirrors.ustc.edu.cn/help/proxmox.html](https://mirrors.ustc.edu.cn/help/proxmox.html) * **清华:**[https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/](https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/) --- ## 2️⃣ 替换 Proxmox 源 ``` echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve trixie pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list ``` --- ## 3️⃣ 替换 Debian 源 ``` deb https://mirrors.ustc.edu.cn/debian trixie main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian trixie-updates main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware ``` --- ## 4️⃣ (可选)CT 模板加速 ``` sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm ``` --- ## 5️⃣ 更新软件索引 ``` apt update ``` --- # 四、系统更新 ``` apt full-upgrade -y apt autoremove --purge -y ``` --- # 五、关闭订阅提示(优化 UI) ``` sed -i "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js systemctl restart pveproxy ``` --- # 六、常用优化(推荐) ## 时间同步 ``` timedatectl set-timezone Asia/Shanghai timedatectl set-ntp true ``` --- ## 开启 IOMMU(直通必备) ``` nano /etc/default/grub ``` **添加:** ``` intel_iommu=on ``` **或 AMD:** ``` amd_iommu=on ``` ``` update-grub reboot ``` --- # 七、常见问题 ## 更新慢 **👉 使用国内镜像** ## Web UI 无法访问 ``` systemctl restart pveproxy systemctl restart pvedaemon ``` ## apt 报错 ``` apt --fix-broken install dpkg --configure -a ``` --- # 八、升级总结(三步法) ``` apt update apt full-upgrade -y reboot ``` © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏