debian12 安装pve
系统基础:需先完成Debian12.9 Bookworm的安装(推荐最小化安装,具体步骤可参考官方文档或第三方教程)25。
网络配置:建议提前设置静态IP,PVE官方WebUI强制要求静态IP,但可通过配置绕过限制(不推荐,可能导致管理异常)2。
硬件要求:x86或ARM架构处理器(如鲲鹏920),至少2GB内存,推荐4GB以上;硬盘空间根据虚拟机需求分配,建议使用SSD提升性能56。
权限准备:确保拥有root权限,所有操作需在管理员账户下执行。
这里是引用
1.在Debian系统上安装PVE(Proxmox Virtual Environment)可以通过以下步骤实现: 1. 更新Debian系统:
首先,确保你的Debian系统是最新的。 bashCopy Code 1 sudo apt update && sudo apt upgrade -y
2. 添加PVE仓库:
你需要添加PVE的官方仓库到你的/etc/apt/sources.list.d/目录。 bashCopy Code 1 echo "deb [arch=amd64] http://download.proxmox.com/debian/pve (lsbrelease−cs)pve−no−subscription"∣sudotee/etc/apt/sources.list.d/pve−install−repo.list3.导入PVE的GPG密钥:导入PVE的GPG密钥,以确保包的真实性和完整性。bashCopyCode1wgethttps://enterprise.proxmox.com/debian/proxmox−release−(lsb_release -cs) pve-no-subscription" | sudo tee /etc/apt/sources.list.d/pve-install-repo.list 3. 导入PVE的GPG密钥: 导入PVE的GPG密钥,以确保包的真实性和完整性。 bashCopy Code 1 wget https://enterprise.proxmox.com/debian/proxmox-release-(lsbrelease−cs)pve−no−subscription"∣sudotee/etc/apt/sources.list.d/pve−install−repo.list3.导入PVE的GPG密钥:导入PVE的GPG密钥,以确保包的真实性和完整性。bashCopyCode1wgethttps://enterprise.proxmox.com/debian/proxmox−release−(lsb_release -cs).gpg -O /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -cs).gpg
4. 更新包列表:
再次更新你的包列表,以便包含新添加的PVE仓库。 bashCopy Code 1 sudo apt update
5. 安装PVE:
安装PVE及其依赖项。 bashCopy Code 1 sudo apt install proxmox-ve postfix open-iscsi -y
6. 配置Postfix:
在安装过程中,Postfix邮件服务器会被安装。你需要配置它,或者如果你不需要它,可以选择跳过配置。
7. 重启系统:
安装完成后,重启系统以使PVE内核生效。 bashCopy Code 1 sudo reboot
8. 访问PVE Web界面:
系统重启后,使用浏览器访问https://你的服务器IP:8006。使用你在安装过程中设置的root用户和密码登录。 注意:确保在访问PVE Web界面时使用https协议,否则可能会遇到访问问题。 通过以上步骤,你应该能够在Debian系统上成功安装并配置PVE。如果遇到任何问题,可以参考PVE的官方文档或搜索相关的解决方案。
root@10:~# apt update
Hit:1 https://mirrors.ustc.edu.cn/debian bookworm InRelease
Hit:2 https://mirrors.ustc.edu.cn/debian bookworm-updates InRelease
Hit:3 https://mirrors.ustc.edu.cn/debian bookworm-backports InRelease
Hit:4 https://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
添加PVE软件源
root@10:~# vi /etc/apt/sources.list
root@10:~# echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
导入PVE官方GPG密钥(具体密钥需参考最新官方文档)46
wget https://enterprise.proxmox.com/debian/proxmox-release-$(lsb_release -cs).gpg -O /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -cs).gpg
更新系统并安装依赖
root@10:~# apt update
Hit:1 https://mirrors.ustc.edu.cn/debian bookworm InRelease
Hit:2 https://mirrors.ustc.edu.cn/debian bookworm-updates InRelease
Hit:3 https://mirrors.ustc.edu.cn/debian bookworm-backports InRelease
Hit:4 https://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease
Get:5 http://download.proxmox.com/debian/pve bookworm InRelease [2,768 B]
Get:6 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages [516 kB]
Fetched 519 kB in 43s (12.1 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt更新
root@10:~# apt full-upgrade
Hit:1 https://mirrors.ustc.edu.cn/debian bookworm InRelease
Hit:2 https://mirrors.ustc.edu.cn/debian bookworm-updates InRelease
Hit:3 https://mirrors.ustc.edu.cn/debian bookworm-backports InRelease
Hit:4 https://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease
Get:5 http://download.proxmox.com/debian/pve bookworm InRelease [2,768 B]
Get:6 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages [516 kB]
Fetched 519 kB in 43s (12.1 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@10:~# apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:fwupd fwupd-amd64-signed grub-common grub-pc grub-pc-bin grub2-commonlibfwupd2
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,462 kB of archives.
After this operation, 76.8 kB of additional disk space will be used.
Do you want to continue? [Y/n] yProcessing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.36-9+deb12u13) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...
root@10:~#
安装pve内核并重启apt install proxmox-default-kernel
apt install proxmox-default-kernel postfix open-iscsi chrony -y
proxmox-default-kernel:安装PVE专用内核,优化虚拟化性能。
root@10:~# apt install proxmox-default-kernel
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:proxmox-kernel-6.8 proxmox-kernel-6.8.12-15-pve-signed pve-firmware
Suggested packages:linux-image
The following packages will be REMOVED:firmware-linux-free
The following NEW packages will be installed:proxmox-default-kernel proxmox-kernel-6.8proxmox-kernel-6.8.12-15-pve-signed pve-firmware
0 upgraded, 4 newly installed, 1 to remove and 0 not upgraded.
Need to get 268 MB of archives.
After this operation, 1,014 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
The following NEW packages will be installed:proxmox-default-kernel proxmox-kernel-6.8proxmox-kernel-6.8.12-15-pve-signed pve-firmware
0 upgraded, 4 newly installed, 1 to remove and 0 not upgraded.
Need to get 268 MB of archives.
After this operation, 1,014 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 pve-firmware all 3.16-3 [164 MB]
Get:2 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 proxmox-kernel-6.8.12-15-pve-signed amd64 6.8.12-15 [103 MB]
Get:3 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 proxmox-kernel-6.8 all 6.8.12-15 [11.2 kB]
Get:4 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 proxmox-default-kernel all 1.1.0 [2,196 B]
Fetched 268 MB in 2h 44min 0s (27.2 kB/s)
(Reading database ... 174044 files and directories currently installed.)
Removing firmware-linux-free (20200122-1) ...
Selecting previously unselected package pve-firmware.
(Reading database ... 174008 files and directories currently installed.)
Preparing to unpack .../pve-firmware_3.16-3_all.deb ...
Unpacking pve-firmware (3.16-3) ...
Selecting previously unselected package proxmox-kernel-6.8.12-15-pve-signed.
Preparing to unpack .../proxmox-kernel-6.8.12-15-pve-signed_6.8.12-15_amd64.deb ...
Unpacking proxmox-kernel-6.8.12-15-pve-signed (6.8.12-15) ...
Selecting previously unselected package proxmox-kernel-6.8.
Preparing to unpack .../proxmox-kernel-6.8_6.8.12-15_all.deb ...
Unpacking proxmox-kernel-6.8 (6.8.12-15) ...
Selecting previously unselected package proxmox-default-kernel.
Preparing to unpack .../proxmox-default-kernel_1.1.0_all.deb ...
Unpacking proxmox-default-kernel (1.1.0) ...
Setting up proxmox-kernel-6.8.12-15-pve-signed (6.8.12-15) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 6.8.12-15-pve /boot/vmlinuz-6.8.12-15-pve
update-initramfs: Generating /boot/initrd.img-6.8.12-15-pve
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 6.8.12-15-pve /boot/vmlinuz-6.8.12-15-pve
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.8.12-15-pve
Found initrd image: /boot/initrd.img-6.8.12-15-pve
Found linux image: /boot/vmlinuz-6.1.0-40-amd64
Found initrd image: /boot/initrd.img-6.1.0-40-amd64
Found linux image: /boot/vmlinuz-6.1.0-29-amd64
Found initrd image: /boot/initrd.img-6.1.0-29-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Setting up pve-firmware (3.16-3) ...
Setting up proxmox-kernel-6.8 (6.8.12-15) ...
Setting up proxmox-default-kernel (1.1.0) ...
root@10:~#
重启系统并切换内核
root@10:~# systemctl reboot
安装pve所需的包apt install proxmox-ve postfix open-iscsi chrony
root@10:~#apt install proxmox-ve postfix open-iscsi chrony -
删除旧的Debian内核
root@10:~# apt remove linux-image-amd64 'linux-image-6.1*' -y
更新引导
root@10:~# update-grub
删除 os-prober 软件包
root@10:~# apt remove os-prober