Proxmox9.0 安装后的优化配置
1.proxmox ve系统源更换
需要将源调整为如下状态
1.1. debian源
root@pve:~# cat /etc/apt/sources.list.d/debian.sources
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
Suites: trixie trixie-updates
Components: main contrib non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
root@pve:~#
1.2. ceph源
root@pve:~# cat /etc/apt/sources.list.d/ceph.sources
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/ceph-squid
Suites: trixie
Components: no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
root@pve:~#
1.3. pve-no-subscription源
root@pve:~# cat /etc/apt/sources.list.d/pve-enterprise.sources
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
root@pve:~#
2.调整LXC CT模板加速源
root@pve:~# sed -i 's#http://download.proxmox.com/images#https://mirrors.tuna.tsinghua.edu.cn/proxmox/images#g' /usr/share/perl5/PVE/APLInfo.pm
root@pve:~# cat /usr/share/perl5/PVE/APLInfo.pm | grep mirrors
url => "https://mirrors.tuna.tsinghua.edu.cn/proxmox/images",
3.去除订阅提示
需要修改/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js中的代码,去除登录时没有订阅的提醒
- 修改前的代码
checked_command: function (orig_cmd) {
Proxmox.Utils.API2Request({
url: '/nodes/localhost/subscription',
method: 'GET',
failure: function (response, opts) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function (response, opts) {
let res = response.result;
if (
res === null ||
res === undefined ||
!res ||
res.data.status.toLowerCase() !== 'active'
) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
buttons: Ext.Msg.OK,
callback: function (btn) {
if (btn !== 'ok') {
return;
}
orig_cmd();
},
});
} else {
orig_cmd();
}
},
});
},
- 修改后的代码
checked_command: function (orig_cmd) {
Proxmox.Utils.API2Request({
url: '/nodes/localhost/subscription',
method: 'GET',
failure: function (response, opts) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function (response, opts) {
let res = response.result;
if (
res === null ||
res === undefined ||
!res ||
res.data.status.toLowerCase() !== 'active'
) {
/*
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
buttons: Ext.Msg.OK,
callback: function (btn) {
if (btn !== 'ok') {
return;
}
orig_cmd();
},
});
*/
orig_cmd();
} else {
orig_cmd();
}
},
});
},
4.重启pve程序进程
root@pve:~# systemctl restart pvedaemon
root@pve:~# systemctl restart pveproxy

浙公网安备 33010602011771号