替换前提议先更新下证书,否则可能由于证书不可用导致 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 速度就很快了。

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

修改成
if (false) {

重启网页服务
systemctl restart pveproxy
(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会自己还原文件