1、更换Proxmox VE为国内源
(1)替换前更新证书,否则由于证书的问题导致https无法使用
apt install apt-transport-https ca-certificates
root@pve-node1:~# apt install apt-transport-https ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'apt' instead of 'apt-transport-https'
apt is already the newest version (2.2.4).
ca-certificates is already the newest version (20210119).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(2)替换通用软件源,Debian的软件源配置文件 /etc/apt/sources.list,将其备份后修改
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
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
(3)替换完成后,替换PVE软件,PVE镜像默认的PVE软件源配置/etc/apt/sources.list.d/pve-enterprise.list,备份后修改以下内容:
deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription
(4)更换完成后,更新
root@pve-node1:~# apt-get update
(5)修改 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
2、解决PVE的未订阅问题
(1)在该文件/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js,使用编辑工具搜索“date.status”
将该内容修改为
if(false)
修改完成后,重启网页服务
systemctl restart pveproxy