Direkt zum Hauptbereich

Proxmox VE auf Hetzner im Linux Rescue-Modus installieren (Debian, wahlweise mit 2 IP-Adressen, RAID0 oder RAID1)

Proxmox VE auf Hetzner mit RAID 1 und 2 IP-Adressen installieren


1. Server im Rescue-Modus starten

Starten Sie den Hetzner-Server im Rescue-Modus und verbinden Sie sich per SSH:

ssh root@

2. RAID 1 einrichten

Installieren Sie die notwendigen Tools und erstellen Sie ein RAID 1 mit zwei Festplatten:

apt update
apt install mdadm
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb

Überprüfen Sie den Status des RAID:

cat /proc/mdstat

Formatieren Sie das RAID mit ext4:

mkfs.ext4 /dev/md0

Binden Sie das RAID ein:

mkdir /mnt/proxmox
mount /dev/md0 /mnt/proxmox

3. Debian und Proxmox VE installieren

Führen Sie eine Basisinstallation von Debian durch und chrooten Sie in das System:

debootstrap --arch amd64 bullseye /mnt/proxmox http://deb.debian.org/debian/
mount --bind /dev /mnt/proxmox/dev
mount --bind /proc /mnt/proxmox/proc
mount --bind /sys /mnt/proxmox/sys
chroot /mnt/proxmox

Fügen Sie das Proxmox VE-Repository hinzu:

echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
wget -qO - http://download.proxmox.com/debian/pve/dists/bullseye/Release.gpg | apt-key add -

Installieren Sie Proxmox VE:

apt update
apt install proxmox-ve postfix open-iscsi

Starten Sie den Server nach der Installation neu:

reboot

4. Netzwerkkonfiguration mit zwei IP-Adressen

Konfigurieren Sie zwei IP-Adressen auf der Netzwerkschnittstelle:

Mit `ifupdown`:

nano /etc/network/interfaces
Beispielkonfiguration:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1

auto eth0:0
iface eth0:0 inet static
    address 192.168.1.20
    netmask 255.255.255.0

Mit `Netplan` (bei neueren Debian-Versionen):

nano /etc/netplan/01-netcfg.yaml
Beispielkonfiguration:
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 192.168.1.10/24
        - 192.168.1.20/24
      gateway4: 192.168.1.1

Wenden Sie die Netzwerkkonfiguration an:

systemctl restart networking

Oder mit Netplan:

netplan apply
 

5. Proxmox VE Web-Oberfläche

Rufen Sie das Proxmox Web-Interface auf, indem Sie im Browser die IP-Adresse des Servers eingeben:

https://192.168.1.10:8006

6. Optional: RAID automatisch mounten

Bearbeiten Sie die fstab, um das RAID beim Booten automatisch zu mounten:

nano /etc/fstab
Fügen Sie die folgende Zeile hinzu:
/dev/md0 / ext4 defaults 0 1

Speichern und schließen Sie die Datei. Der Server wird nun das RAID-Array automatisch mounten.

Kommentare