Debian12安装Proxmox VE

一、环境准备

需要准备一些软硬件环境

硬件:

CPU开启虚拟化
开启VT-D(可选)
有网络

软件:

debian12

还需要一些人为因素:

仔细看教程

二、安装Debian12(如果你的系统是Debian12,请跳过此步)

由于一些服务商并没有提供Debian12系统镜像,因此我们需要手动安装Debian12

本教程使用Reinstal来进行系统重装

传送门:一键DD/重装脚本

你只需要执行以下命令:

第一条:安装curl(部分系统并没有Curl因此需要自行安装)

sudo apt install curl

第二条:下载reinstall.sh脚本

国外服务器:

curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh

国内服务器:

curl -O https://jihulab.com/bin456789/reinstall/-/raw/main/reinstall.sh

第三条:重装系统

bash reinstall.sh debian 12

接下来,泡杯咖啡安静的等待重装完成

三、准备系统环境

(reinstall安装完的系统root密码为123@@@,请及时更改密码)

1.更新软件

sudo apt update

2.修改hostname

hostnamectl set-hostname server0 #server0为要修改的主机名

3.修改/etc/hosts文件

root@debian:/etc# nano /etc/hosts
127.0.0.1       localhost
xx.xx.xx.xx  server0  server0  # xx.xx.xx.xx为服务器公网IP server0为主机名

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

4.检查是否修改成功

执行:

hostname --ip-address

查看输出:

root@debian:/etc# hostname --ip-address
xx.xx.xx.xx

执行:

hostname

查看输出:

root@debian:/etc# hostname
server0

四、准备Proxmox VE软件源

1.添加 Proxmox VE 存储库

echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list

2.添加公钥

wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg 

3.更新软件

apt update && apt full-upgrade

五、安装 Proxmox VE 内核

首先,您需要安装并启动 Proxmox VE 内核,因为某些软件包依赖于特定内核编译标志的设置或功能扩展(例如,apparmor)的可用性。

apt install proxmox-default-kernel

重启

systemctl reboot

六、安装 Proxmox VE 软件包

apt install proxmox-ve postfix open-iscsi chrony

请注意,您可以chrony用任何其他 NTP 守护程序替换它,但我们建议不要systemd-timesyncd在服务器系统上使用,因为该ntpsec-ntpdate选项可能会与某些硬件上的启动网络相冲突。根据您的需要配置在安装时需要用户输入的软件包。

如果您的网络中有一个邮件服务器,则应将 postfix 配置为satellite system。您现有的邮件服务器将成为中继主机,它将 Proxmox VE 发送的电子邮件路由到最终收件人。

如果您不知道在这里输入什么,请选择 local only 并保留系统名称

七、删除 Debian 内核

Proxmox VE 附带了自己的内核,保留 Debian 默认内核可能会导致升级出现问题,例如,使用 Debian 点版本。因此,您必须删除默认的 Debian 内核:

apt remove linux-image-amd64 'linux-image-6.1*'

通过运行以下命令更新并检查 grub2 配置:

update-grub

八、连接到 Proxmox VE Web 界面(安装完成!!!)

连接到管理 Web 界面 ( https://your-ip-address:8006)。如果您是全新安装且尚未添加任何用户,则应选择 PAM 身份验证领域并使用root用户帐户登录。

此时密码为服务器root用户密码。