环境

Proxmox VE PVE 6.2
PVE 网页 自带 Shell。选中 PVE 节点,选择 Shell,通过 Shell 连接到 PVE。

取消所有"无有效订阅"的订阅弹窗

You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.

取消 PVE 所有"无有效订阅"的订阅提示。包括登录时,点击"软件包版本"按钮等等提示。

# 编辑 /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
vi /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js

# 输入 / 进入查找模式,再粘贴以下文本进行查找
# if (data.status !== 'Active') {
# 找到,并修改

success: function(response, opts) {
    var data = response.result.data;
    // 注释下行
    //if (data.status !== 'Active') {
    // 新增下行
    if (false) {
        Ext.Msg.show({
            title: gettext('No valid subscription'),
            icon: Ext.Msg.WARNING,
            message: Proxmox.Utils.getNoSubKeyHtml(data.url),
            buttons: Ext.Msg.OK,
            callback: function(btn) {
                if (btn !== 'ok') {
                    return;
                }
                orig_cmd();
            }
        });
    } else {
        orig_cmd();
    }
}

取消登录时"误有效订阅"的订阅弹窗

仅取消登录时"无有效订阅"的提示。

# 编辑 /usr/share/pve-manager/js/pvemanagerlib.js
vi /usr/share/pve-manager/js/pvemanagerlib.js

# 输入 / 进入查找模式,再粘贴以下文本进行查找
# Ext\.create('PVE\.window\.LoginWindow'
# 找到,并修代码

if (!me.login) {
    me.login = Ext.create('PVE.window.LoginWindow', {
    handler: function(data) {
        me.login = null;
        me.updateLoginData(data);
            // 注释下行
            //Proxmox.Utils.checked_command(function() {}); // display subscription status
        }
    });
}

更换国内 163 源

# 编辑 /etc/apt/sources.list 文件
vi /etc/apt/sources.list

# 注释文件全部内容
#deb http://ftp.debian.org/debian buster main contrib
#deb http://ftp.debian.org/debian buster-updates main contrib
#security updates
#deb http://security.debian.org buster/updates main contrib
# 
# 追加以下内容
# user custom 163 source
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

# 保存并退出
:wq

# 更新
apt update

删除企业源/企业存储库

稳定和推荐的存储库,适合生产使用。默认启用。用于所有 Proxmox VE 的订阅用户。非订阅用户可移除该库,避免出现提示性错误消息。

# 删除此文件或注释此文件中内容
rm -rf /etc/apt/sources.list.d/pve-enterprise.list

# 若删除后需恢复
echo 'deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise' > /etc/apt/sources.list.d/pve-enterprise.list

其他常用库

Proxmox VE 无需订阅库

用于测试和非生产用途的推荐存储库。它的软件包没有经过严格的测试和验证。官方建议配置于:/etc/apt/sources.list。

echo 'deb http://download.proxmox.com/debian/pve buster pve-no-subscription' >> /etc/apt/sources.list

Proxmox VE 测试库

包含最新的软件包,主要供开发人员用来测试新功能或错误修复。官方建议配置于:/etc/apt/sources.list。

echo 'deb http://download.proxmox.com/debian/pve buster pvetest' >> /etc/apt/sources.list

Proxmox VE Ceph 库

Proxmox VE Ceph 主库。包含 Proxmox VE Ceph 的主要软件包。适合生产。如果在 Proxmox VE 上运行 Ceph 客户端或完整的 Ceph 集群,请使用此存储库。官方建议配置于:/etc/apt/sources.list.d/ceph.list。

echo 'deb http://download.proxmox.com/debian/ceph-nautilus buster main' >> /etc/apt/sources.list.d/ceph.list

Proxmox VE Ceph 测试库

包含还未被移动 Ceph 主库的软件包。用于测试位于 Proxmox VE 的 Ceph 的新版本。官方建议配置于:/etc/apt/sources.list.d/ceph.list。

echo 'deb http://download.proxmox.com/debian/ceph-nautilus buster test' >> /etc/apt/sources.list.d/ceph.list

更多存储库

参考:pve.proxmox.com/wiki/Package_Repositories

参考

blog.wxhbts.com/pve.html
gist.github.com/u0d7i/01f78999feff1e2a8361

最后修改:2020 年 11 月 07 日 11 : 40 PM
如果觉得文章帮助了您,您可以随意赞赏。