PVE安装后的优化

  • 时间:2025-11-16 20:11 作者: 来源: 阅读:0
  • 扫一扫,手机访问
摘要:1、PVE更换国内源替换前提议先更新下证书,否则可能由于证书不可用导致 https 无法使用,进而无法下载所有软件。apt install apt-transport-https ca-certificates第一替换通用软件源, Debian 的软件源配置文件是 /etc/apt/sources.list,备份后将其中内容修改为以下即可。nano /etc/apt/sources.list de

1、PVE更换国内源

替换前提议先更新下证书,否则可能由于证书不可用导致 https 无法使用,进而无法下载所有软件。

apt install apt-transport-https ca-certificates

第一替换通用软件源, Debian 的软件源配置文件是 /etc/apt/sources.list,备份后将其中内容修改为以下即可。

nano /etc/apt/sources.list

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

原来不使用的可以用#注释掉,改好后按 ctrl+x 再按Y,回车,就可以完成保存。

之后替换 pve 软件源,pve 镜像默认的 pve 软件源配置文件是 /etc/apt/sources.list.d/pve-enterprise.list ,备份后将其中内容替换为以下即可:(修改步骤同前面。)

deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription

最后更新下,速度很快:

apt-get update

修改 CT Templates (LXC 容器) 源

将 /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

针对/usr/share/perl5/PVE/APLInfo.pm文件的修改,重启后生效。

systemctl restart pvedaemon.service

之后在 pve 网页端下载 CT Templates 速度就很快了。

2、去除无效订阅


PVE安装后的优化

编辑proxmoxlib.js这个js文件:/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js,用编辑工具搜索“data.status”


PVE安装后的优化

修改成

if (false) {


PVE安装后的优化

重启网页服务

systemctl restart pveproxy

3、 一键给PVE增加温度,cpu功耗频率,硬盘等信息

(2023.12.13)SHELL脚本:一键给PVE增加温度,cpu功耗频率,硬盘等信息-软路由,x86系统,openwrt(x86),Router OS 等-恩山无线论坛 (right.com.cn)

使用方法:

可以一键执行下面:

(curl -Lf -o /tmp/temp.sh https://raw.githubusercontent.com/a904055262/PVE-manager-status/main/showtempcpufreq.sh || curl -Lf -o /tmp/temp.sh https://mirror.ghproxy.com/https://raw.githubusercontent.com/a904055262/PVE-manager-status/main/showtempcpufreq.sh) && chmod +x /tmp/temp.sh && /tmp/temp.sh remod

没有显示功耗的,请执行下面的命令安装依赖,请确保安装成功,就是最后的一行的输出,必须为 “成功!” 才表明安装成功了。

apt update ; apt install linux-cpupower && modprobe msr && echo msr > /etc/modules-load.d/turbostat-msr.conf && chmod +s /usr/sbin/turbostat && echo 成功!

如果你已经用别人的脚本之类的修改过页面,请先用下面命令先回复官方设置之后,才可以运行本脚本:

apt update

apt install pve-manager  proxmox-widget-toolkit  --reinstall

rm -f /usr/share/perl5/PVE/API2/Nodes.pm*bak

rm -f /usr/share/pve-manager/js/pvemanagerlib.js*bak

rm -f /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js*bak

另外:每次pve升级之后都需要执行一次脚本,由于升级后PVE会自己还原文件

  • 全部评论(0)
最新发布的资讯信息
【系统环境|】基于SpringBoot+POI实现的excel导入导出(教程)(2025-11-16 20:19)
【系统环境|】MySQL8.0_安装常见问题解决文档(2025-11-16 20:19)
【系统环境|】MacOS微信4.0双开教程(2025-11-16 20:18)
【系统环境|】Flutlab使用指南及功能介绍(2025-11-16 20:17)
【系统环境|】MySQL8.0_安装和使用文档(Windows版)(2025-11-16 20:17)
【系统环境|】UEFI+GPT平台一键安装Windows方法(2025-11-16 20:16)
【系统环境|】Android语言基础教程(88)Android多个Activity的使用之调用另一个Activity并返回结果:Activity漂流记:一次“不归路”与“带娃回家”的编程奇遇(2025-11-16 20:16)
【系统环境|】【2025】下载安装Anaconda(Python语言)(2025-11-16 20:15)
【系统环境|】Docker Desktop使用教程(2025-11-16 20:15)
【系统环境|】go语言安装及环境配置(史上最详细)(2025-11-16 20:14)
手机二维码手机访问领取大礼包
返回顶部