在本教程中,我们将能够在 Debian 12 (Bookworm) Linux 系统上安装和配置 Proxmox VE 8 虚拟化。这是使用 Debian 12 ISO 在 Baremetal 服务器上完成的。建议使用 Proxmox VE ISO 进行安装,而不是在 Debian 12 Linux 操作系统上执行安装。
ps.个人现在使用的是Debian12安装pve,直装pve使用过但是不稳定,请自行选择如何安装pve
设置先决条件
- Debian Bookworm 的运行实例
- 支持 Intel 64 或 AMD64 CPU 扩展的 64 位处理器。
- 以 root 或使用 sudo 的用户身份访问 Debian 服务器终端
- 服务器上的 Internet 访问
- 运行实例所需的足够硬件资源
第 1 步:更新 Debian 操作系统
确认系统已更新。sudo apt -y update && sudo apt -y upgrade
更新后系统可能需要重新启动。
[ -f /var/run/reboot-required ] && sudo reboot -f
第 2 步:设置 Proxmox 服务器主机名
为您的服务器主机名设置 FQDN。sudo hostnamectl set-hostname pve01.example.com --static
其中 pve01.example.com 替换为系统的正确主机名。
检查主接口的 IP 地址。
$ ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:ef:22:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.200.50/24 brd 192.168.200.255 scope global dynamic noprefixroute enp1s0
valid_lft 1982sec preferred_lft 1982sec
inet6 fe80::5054:ff:feef:22c5/64 scope link noprefixroute
valid_lft forever preferred_lft forever
编辑您的 /etc/hosts 文件以更新 IP 地址和 DNS 名称条目。
$ sudo vim /etc/hosts
192.168.200.50 pve01.example.com pve01
接下来在服务器上设置正确的时区。
sudo timedatectl set-timezone Africa/Nairobi
让我们注销服务器并返回
logout
使用 hostname 命令测试配置的主机名是否ok:
$ hostname --ip-address
192.168.200.50
步骤 3:添加 Proxmox VE 存储库
在添加存储库之前安装所需的依赖项。sudo apt install curl gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates
Proxmox VE 8 服务器软件包包含在 Proxmox 官方维护的 APT 存储库中。在您的系统中配置存储库。
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" | sudo tee /etc/apt/sources.list.d/pve-install-repo.list
导入存储库 GPG 密钥
curl -fsSL http://download.proxmox.com/debian/proxmox-release-bookworm.gpg|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/proxmox.gpg
更新您的 APT 源列表
$ sudo apt update
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Get:4 http://download.proxmox.com/debian/pve bookworm InRelease [2,768 B]
Hit:5 http://mirror.hetzner.com/debian/packages bookworm InRelease
Hit:6 http://mirror.hetzner.com/debian/packages bookworm-updates InRelease
Hit:7 http://mirror.hetzner.com/debian/security bookworm-security InRelease
Get:8 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages [129 kB]
Fetched 131 kB in 2s (86.7 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
添加存储库后升级新包。
$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
ifupdown
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 82.0 kB of archives.
After this operation, 2048 B disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://download.proxmox.com/debian/pve bullseye/pve-no-subscription amd64 ifupdown amd64 0.8.36+pve1 [82.0 kB]
Fetched 82.0 kB in 0s (2558 kB/s)
Reading changelogs... Done
(Reading database ... 137105 files and directories currently installed.)
Preparing to unpack .../ifupdown_0.8.36+pve1_amd64.deb ...
Unpacking ifupdown (0.8.36+pve1) over (0.8.36) ...
Setting up ifupdown (0.8.36+pve1) ...
Processing triggers for man-db (2.9.4-2) ...
添加 Proxmox VE Ceph 存储库:
这是 Proxmox VE 的主要 Ceph 存储库,包含用于生产用途的 Ceph 包。您还可以使用此存储库仅更新 Ceph 客户端。echo "deb http://download.proxmox.com/debian/ceph-quincy bookworm main" | sudo tee /etc/apt/sources.list.d/ceph.list
步骤 4:安装 Proxmox VE 8 软件包
安装 Proxmox VE 内核。
sudo apt install pve-kernel-6.2
内核安装后重新启动系统。
sudo systemctl reboot
通过在 PVE 服务器中运行以下命令来安装 Proxmox 基础包。
sudo apt update && sudo apt install proxmox-ve postfix open-iscsi
如果您的网络中有邮件服务器,则应将 postfix 配置为卫星系统,并且您现有的邮件服务器将作为“中继主机”来路由电子邮件由 proxmox 服务器发送到最终接收者。如果您不知道在此处输入什么内容,请选择仅限本地。


...
Setting up libpve-storage-perl (8.0.2) ...
Setting up pve-firewall (5.0.3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/pvefw-logger.service → /lib/systemd/system/pvefw-logger.service.
Created symlink /etc/systemd/system/multi-user.target.wants/pve-firewall.service → /lib/systemd/system/pve-firewall.service.
Setting up libpve-guest-common-perl (5.0.4) ...
Setting up pve-container (5.0.4) ...
Setting up pve-ha-manager (4.0.2) ...
watchdog-mux.service is a disabled or a static unit, not starting it.
Created symlink /etc/systemd/system/multi-user.target.wants/pve-ha-lrm.service → /lib/systemd/system/pve-ha-lrm.service.
Created symlink /etc/systemd/system/multi-user.target.wants/pve-ha-crm.service → /lib/systemd/system/pve-ha-crm.service.
Setting up qemu-server (8.0.6) ...
Created symlink /etc/systemd/system/multi-user.target.wants/qmeventd.service → /lib/systemd/system/qmeventd.service.
Setting up pve-manager (8.0.4) ...
update successful
Created symlink /etc/systemd/system/multi-user.target.wants/pvedaemon.service → /lib/systemd/system/pvedaemon.service.
Created symlink /etc/systemd/system/multi-user.target.wants/pveproxy.service → /lib/systemd/system/pveproxy.service.
Created symlink /etc/systemd/system/multi-user.target.wants/spiceproxy.service → /lib/systemd/system/spiceproxy.service.
Created symlink /etc/systemd/system/multi-user.target.wants/pvestatd.service → /lib/systemd/system/pvestatd.service.
Created symlink /etc/systemd/system/getty.target.wants/pvebanner.service → /lib/systemd/system/pvebanner.service.
Created symlink /etc/systemd/system/multi-user.target.wants/pvescheduler.service → /lib/systemd/system/pvescheduler.service.
Created symlink /etc/systemd/system/timers.target.wants/pve-daily-update.timer → /lib/systemd/system/pve-daily-update.timer.
Created symlink /etc/systemd/system/sysinit.target.wants/pvenetcommit.service → /lib/systemd/system/pvenetcommit.service.
Created symlink /etc/systemd/system/pve-manager.service → /lib/systemd/system/pve-guests.service.
Created symlink /etc/systemd/system/multi-user.target.wants/pve-guests.service → /lib/systemd/system/pve-guests.service.
Backing up lvm.conf before setting pve-manager specific settings..
'/etc/lvm/lvm.conf' -> '/etc/lvm/lvm.conf.bak'
Setting 'global_filter' in /etc/lvm/lvm.conf to prevent zvols from being scanned:
global_filter=["a|.*|"] => global_filter=["r|/dev/zd.*|"]
Setting up proxmox-ve (8.0.2) ...
Processing triggers for libc-bin (2.36-9+deb12u1) ...
Processing triggers for pve-ha-manager (4.0.2) ...
卸载 Debian 默认内核:
sudo apt remove linux-image-amd64 'linux-image-6.1*'
通过运行以下命令更新并检查 grub2 配置。
sudo update-grub
删除 os-prober 包。
sudo apt remove os-prober
安装后重新启动 Debian 系统以启动到 Proxmox 环境。
sudo systemctl reboot
Proxmox VE 代理服务应侦听端口 8006。
$ sudo ss -tunelp | grep 8006
tcp LISTEN 0 4096 *:8006 *:* uid:33 ino:25414 sk:18 cgroup:/system.slice/pveproxy.service v6only:0 <->
第5步:访问Proxmox VE网页界面
打开浏览器并输入 Proxmox VE Web 控制台 URL – (https://serverip_or_hostname:8006)。

passwd root
登录后,创建一个名为 vmbr0 的 Linux 桥,


Comments NOTHING