Skip to content

Instantly share code, notes, and snippets.

@mstaack
Created August 11, 2018 14:34
Show Gist options
  • Save mstaack/0a06afe3a72c7a168f5062861206aebc to your computer and use it in GitHub Desktop.
Save mstaack/0a06afe3a72c7a168f5062861206aebc to your computer and use it in GitHub Desktop.
hetzner proxmox all in one
#!/usr/bin/env bash
# Hetzner Disk Layout all LVM
# PART /boot ext4 512M
# PART lvm pve all
# LV pve swap swap swap 8G
# LV pve root / ext4 100G
# Basics
apt update && apt update -y
apt install htop iotop
# Proxmox
echo "deb http://download.proxmox.com/debian stretch pve-no-subscription" >> /etc/apt/sources.list
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
apt update && apt dist-upgrade -y
apt -y install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv
# Disable Premium Repo
sed -i '1 s/^/# /' /etc/apt/sources.list.d/pve-enterprise.list # comment pve enterprise repo
# Disable Nag
sed -i.bak 's/NotFound/Active/g' /usr/share/perl5/PVE/API2/Subscription.pm && systemctl restart pveproxy.service
# Network Forwards
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.d/99-networking.conf
echo "net.ipv4.conf.enp0s31f6.send_redirects=0" >> /etc/sysctl.d/99-networking.conf
echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.d/99-networking.conf
#LV Disk
lvcreate -L 100G -n data pve
lvconvert --type thin-pool pve/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment