Skip to content

Instantly share code, notes, and snippets.

@kylefmohr
Created June 26, 2021 01:35
Show Gist options
  • Save kylefmohr/3912f1ccb7a860e42929c3e1f7cd58c6 to your computer and use it in GitHub Desktop.
Save kylefmohr/3912f1ccb7a860e42929c3e1f7cd58c6 to your computer and use it in GitHub Desktop.
Script to turn a standard Debian 10 Buster installation into a Proxmox host
#!/bin/bash
#pre-requisite: hostname must resolve to the public IP of the server!
#if you receive errors regarding being unable to configure proxmox packages, this is why!
#you can change the hostname with "hostnamectl set-hostname <new hostname>" and reboot
sudo apt update && sudo apt upgrade -y
myip=$(curl --silent ifconfig.me)
echo $myip
hosts=hosts
echo "localhost 127.0.0.1" > hosts
echo $(hostname) $myip >> hosts
mv -f hosts /etc/hosts
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
#line below intended to allow script to complete without user input, but it doesn't presently work. feel free to comment out
sudo dpkg-reconfigure debconf -f noninteractive -p critical
apt update && apt full-upgrade -y
apt install proxmox-ve postfix open-iscsi -y
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment