Proxmox 4 Manual Install

  • base netinst install of jessie - deselect everything from tasksel
    • hostname testserver – domain mcp.lcl
    • default partition layout - noatime and discard on root filesystem
  • > /etc/motd
  • apt-get --no-install-recommends install aptitude
  • aptitude install ssh (this will pull in xauth, but that's okay)
  • aptitude install less fbset screen rsync psmisc file patch ethtool strace tcpdump vim bzip2 xz-utils
  • aptitude --without-recommends install dnsutils
  • adduser tdobes adm
  • adduser tdobes systemd-journal
  • aptitude install dbus
  • sed -i -e 's/^deb.* main$/& contrib non-free/g' /etc/apt/sources.list
  • aptitude update && aptitude forget-new
  • aptitude install intel-microcode
  • aptitude --without-recommends install ntp
    echo '[Unit]' > /etc/systemd/system/ntp.service
    echo 'Description=Network Time Protocol daemon' >> /etc/systemd/system/ntp.service
    echo 'After=network.target' >> /etc/systemd/system/ntp.service
    echo >> /etc/systemd/system/ntp.service
    echo '[Service]' >> /etc/systemd/system/ntp.service
    echo 'ExecStart=/usr/sbin/ntpd -n -g -u ntp:ntp' >> /etc/systemd/system/ntp.service
    echo >> /etc/systemd/system/ntp.service
    echo '[Install]' >> /etc/systemd/system/ntp.service
    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/ntp.service
    systemctl enable ntp.service
  • mkdir -p /etc/systemd/system/ssh.socket.d
    echo '[Socket]' > /etc/systemd/system/ssh.socket.d/port-2222.conf
    echo 'ListenStream=2222' >> /etc/systemd/system/ssh.socket.d/port-2222.conf
    systemctl disable ssh.service && systemctl enable ssh.socket
  • mkdir -p /etc/systemd/system/getty\@tty1.service.d
    echo '[Service]' > /etc/systemd/system/getty\@tty1.service.d/noclear.conf
    echo 'TTYVTDisallocate=no' >> /etc/systemd/system/getty\@tty1.service.d/noclear.conf
  • aptitude purge acpid acpi-support-base # systemd-logind takes care of this
  • # this is actually included in the proxmox-distributed file now: sed -i -e 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet panic=5"/g' /etc/default/grub && update-grub
  • systemctl mask keyboard-setup.service
    systemctl mask console-setup.service
    systemctl mask rc-local.service
  • aptitude --without-recommends install irqbalance
  • aptitude --without-recommends install lvm2 mdadm bridge-utils ifenslave # vlan (now conflicts with pve-manager) – when asked about arrays to start at boot, enter root filesystem or leave blank for none
  • aptitude --without-recommends install nut sshfs
  • aptitude install lsof memtest86+ parted time sysstat
  • aptitude --without-recommends install cifs-utils
  • aptitude install unattended-upgrades
  • dpkg-reconfigure -plow unattended-upgrades # select “Yes”
  • #echo '# PVE testing packages provided by proxmox.com' > /etc/apt/sources.list.d/pvetest.list
    #echo deb http://download.proxmox.com/debian jessie pvetest >> /etc/apt/sources.list.d/pvetest.list
    echo '# PVE pve-no-subscription repository provided by proxmox.com, NOT recommended for production use' > /etc/apt/sources.list.d/pve-no-subscription.list
    echo deb http://download.proxmox.com/debian jessie pve-no-subscription >> /etc/apt/sources.list.d/pve-no-subscription.list
    wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -
    aptitude update && aptitude full-upgrade
  • set up appropriate /etc/hosts and /etc/network/interfaces – for MCP:
    sed -i -e 's/^127.0.1.1.*$/# &\n192.168.24.241\tcastor.mcp.lcl\tcastor\n192.168.24.242\tpollux.mcp.lcl\tpollux\n192.168.24.243\taltair.mcp.lcl\taltair\n192.168.24.244\tdeneb.mcp.lcl\tdeneb\n192.168.24.245\tvega.mcp.lcl\tvega\n192.168.24.240\ttestserver.mcp.lcl\ttestserver\tpvelocalhost/g' /etc/hosts
    
    echo >> /etc/network/interfaces
    echo '# PCIe' >> /etc/network/interfaces
    echo 'allow-hotplug eth2' >> /etc/network/interfaces
    echo 'iface eth2 inet manual' >> /etc/network/interfaces
    echo $'\tpre-up ifconfig $IFACE mtu 7200' >> /etc/network/interfaces
    echo >> /etc/network/interfaces
    echo '# server-to-server network' >> /etc/network/interfaces
    echo 'auto vmbr0' >> /etc/network/interfaces
    echo 'iface vmbr0 inet static' >> /etc/network/interfaces
    echo $'\taddress 192.168.24.240' >> /etc/network/interfaces
    echo $'\tnetmask 255.255.255.0' >> /etc/network/interfaces
    echo $'\tbridge_ports eth2' >> /etc/network/interfaces
    echo $'\tbridge_stp off' >> /etc/network/interfaces
    echo $'\tbridge_fd 0' >> /etc/network/interfaces
    echo $'\tmtu 7200' >> /etc/network/interfaces
    
    ifup eth2 && ifup vmbr0
  • copy main.cf to /etc/postfix/ :
    mkdir -p /etc/postfix
    echo '# See /usr/share/postfix/main.cf.dist for a commented, more complete version' > /etc/postfix/main.cf
    echo >> /etc/postfix/main.cf
    echo 'smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)' >> /etc/postfix/main.cf
    echo 'biff = no' >> /etc/postfix/main.cf
    echo >> /etc/postfix/main.cf
    echo "# appending .domain is the MUA's job." >> /etc/postfix/main.cf
    echo 'append_dot_mydomain = no' >> /etc/postfix/main.cf
    echo >> /etc/postfix/main.cf
    echo '# Uncomment the next line to generate "delayed mail" warnings' >> /etc/postfix/main.cf
    echo '#delay_warning_time = 4h' >> /etc/postfix/main.cf
    echo >> /etc/postfix/main.cf
    echo 'alias_maps = hash:/etc/aliases' >> /etc/postfix/main.cf
    echo 'alias_database = hash:/etc/aliases' >> /etc/postfix/main.cf
    echo 'mydestination = $myhostname, localhost.$mydomain, localhost' >> /etc/postfix/main.cf
    echo 'relayhost = ' >> /etc/postfix/main.cf
    echo 'mynetworks = 127.0.0.0/8' >> /etc/postfix/main.cf
    echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf
    echo 'recipient_delimiter = +' >> /etc/postfix/main.cf
    echo >> /etc/postfix/main.cf
    echo >> /etc/postfix/main.cf
  • aptitude install postfix proxmox-ve # side note: this will force removal of vlan and firmware. select “no configuration” for postfix
  • aptitude install bootlogd omping open-iscsi
  • aptitude forget-new
  • sed 's/^deb/# deb/g' -i /etc/apt/sources.list.d/pve-enterprise.list
  • aptitude unmarkauto linux-base irqbalance && aptitude purge linux-image-amd64 linux-image-3.16.0-4-amd64
  • aptitude install ksm-control-daemon # only on systems not running ZFS, as this harms ZFS performance
  • aptitude install nfs-kernel-server # as needed
  • # remove subscription nag popup
    # see http://www.howdididothat.info/2015/11/08/proxmox-4-pve-no-subscription/
    # old location: sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/ext6/pvemanagerlib.js
    sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/js/pvemanagerlib.js
  • OPTIONAL: aptitude install zfsutils
computer/proxmox_4_manual_install.txt · Last modified: 2017/02/08 01:31 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS