CieyGet
CieyGet

技术改变世界

  • 首页
  • 分类
  • 文章归档
  • 荷兰猪

  • 搜索
手机 折腾 破解 救砖 维修 硬改 B860AV1.1 Android zerotier docker 网络 windows linux ubuntu 中兴 Padavan 宝塔 华为 电视盒子 VIM PVE 光猫 友华 PT926G

[PVE7.x]安装|换源|去订阅提示|LXC仓库

发表于 2022-07-08 | 分类于 PVE虚拟机 | 0 | 阅读次数 108

图片-1666537992764

PVE7 安装后默认配置的 apt 软件源和 CT (LXC) 容器模板源均是官方默认的,国内使用性能不佳,建议替换为 清华 Tuna 提供的国内镜像源,速度将有一个较大的提升。如果 pve 官网 iso 镜像下载较慢,也可在 tuna 提供的镜像站下载:https://mirrors.tuna.tsinghua.edu.cn/proxmox/iso/
本文以 pve 7.1.4 (debian 11 bulleye) 为例,其他版本请自行在镜像网站寻找对应地址。

去除订阅

 sed -i_orig "s/data.status === 'Active'/true/g" /usr/share/pve-manager/js/pvemanagerlib.js
 sed -i_orig "s/if (res === null || res === undefined || \!res || res/if(/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
 sed -i_orig "s/.data.status.toLowerCase() !== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
systemctl restart pveproxy

替换 apt 软件源

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

sudo 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

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

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

最后更新下,速度很快:

sudo apt-get update

修改 LXC 容器 源

修改文件 /usr/share/perl5/PVE/APLInfo.pm 中默认的源地址

image-1666668022259

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 速度就很快了

# PVE
中兴盒子ZTE-B860AV1.1T、AV2.1 固件|armbain|刷机
宝塔禁止直接用IP访问与防止SSL泄露IP
  • 文章目录
  • 站点概览
CieyGet

CieyGet

36 日志
13 分类
23 标签
RSS
Creative Commons
© 2023 CieyGet
0%