PVE 虚拟机主机 更换国内源以及解决无效订阅的问题
创始人
2025-01-19 19:33:15
0

1、PVE更换国内源

 注:本文以 pve 7.3.3 为例。

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

apt install apt-transport-https ca-certificates

首先替换通用软件源, 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

 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、去除无效订阅

首先你可以登录shh工具,下载proxmoxlib.js这个js文件。 

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

 修改成

if (false) {

文件修改后保存上传,执行 systemctl restart pveproxy 命令重启网页服务

systemctl restart pveproxy

相关内容

热门资讯

4分钟普及!欢喜广西麻将十三张... 4分钟普及!欢喜广西麻将十三张有挂么,咪咪扑克确实是真的有挂,细节方法(有挂机密);一、欢喜广西麻将...
4分钟辅助挂!闲逸碰胡有外挂么... 4分钟辅助挂!闲逸碰胡有外挂么“详细透视辅助插件教程”原来真的有挂1、起透看视 闲逸碰胡有外挂么透明...
重大科普!中至上饶麻将有挂吗(... 重大科普!中至上饶麻将有挂吗(透视辅助)外挂透明挂辅助工具(2023已更新)(哔哩哔哩)1、下载好中...
推荐一款!财神十三张辅助神器(... 推荐一款!财神十三张辅助神器(透视辅助)好像是有挂(2026已更新)(哔哩哔哩);1、下载好财神十三...
5分钟科普!桂林字牌辅助,智星... 5分钟科普!桂林字牌辅助,智星德州扑克果然是真的有挂,大神讲解(有挂实操)1、玩家可以在桂林字牌辅助...
7分钟辅助挂!熊猫四川麻将隐藏... 7分钟辅助挂!熊猫四川麻将隐藏功能“详细透视辅助工具教程”原来真的有挂;熊猫四川麻将隐藏功能是一种具...
揭秘关于!边锋斗地主神器软件(... 揭秘关于!边锋斗地主神器软件(透明挂)透视脚本辅助器(2024已更新)(哔哩哔哩)边锋斗地主神器软件...
一秒答解!南通长牌辅助器(透明... 一秒答解!南通长牌辅助器(透明挂)切实真的是有挂(2020已更新)(哔哩哔哩);1、点击下载安装,南...
1分钟发现!开心联盟牛牛外 挂... 1分钟发现!开心联盟牛牛外 挂多少钱,众合推扑克本来真的有挂,曝光教程(有挂透视);1、首先打开开心...
六分钟辅助挂!闲乐游戏辅助器“... 六分钟辅助挂!闲乐游戏辅助器“详细透视辅助脚本教程”原来真的有挂1、每一步都需要思考,不同水平的挑战...