russel053/ 十一月 17, 2017/ Proxmox VE

PVE安裝完成後首次步驟:

nano /etc/apt/sources.list.d/pve-enterprise.list
註解掉下面這一行.
# deb https://enterprise.proxmox.com/debian stretch pve-enterprise

nano /etc/apt/sources.list
增加:
deb http://download.proxmox.com/debian stretch pve-no-subscription

再來執行更新
apt-get update && apt-get upgrade (選填 -y)
pveam update

Proxmox 5
/etc/apt/sources.list

deb http://ftp.tw.debian.org/debian stretch main contrib
deb http://download.proxmox.com/debian stretch pve-no-subscription
# security updates
deb http://security.debian.org stretch/updates main contrib

選填(Beta):
deb http://download.proxmox.com/debian/pve stretch pvetest

GPG Key Fail:

wget http://download.proxmox.com/debian/key.asc
apt-key add key.asc

遇到 no such method ‘PVE::CLI::pveam::run_cli’ 解法:

apt dist-upgrade

第一次安裝需要安裝程式:

apt install screen vnstat sysstat atop htop python-glade2 lm-sensors zlib1g-dev uuid-dev libmnl-dev gcc make autoconf autoconf-archive autogen automake pkg-config curl python python-yaml python-mysqldb python-psycopg2 nodejs lm-sensors netcat git sudo nethogs iotop pve-headers subversion openvswitch-switch software-properties-common locate debhelper autotools-dev dkms zlib1g-dev quilt python-libxml2 swig dpatch graphviz chrpath lshw net-tools flex bison tcl tk gfortran

選填: nfs-kernel-server samba samba-common darkice 

Glances:
curl -L https://bit.ly/glances | /bin/bash

Netdata:
git clone https://github.com/firehol/netdata.git --depth=1
cd netdata

更新之後關閉email通知:
nano /etc/netdata/health_alarm_notify.conf
nano /usr/lib/netdata/conf.d/health_alarm_notify.conf
SEND_EMAIL:"NO"

nano /etc/netdata/netdata.conf 禁用netdata中的所有警報
[health]
  enabled = no
[registry]
         enabled = no

安裝流程:

nano /etc/apt/sources.list.d/pve-enterprise.list
註解掉下面這一行.
# deb https://enterprise.proxmox.com/debian stretch pve-enterprise

nano /etc/apt/sources.list
增加:
deb http://download.proxmox.com/debian stretch pve-no-subscription

再來執行更新
apt-get update && apt-get upgrade -y
pveam update

apt install screen vnstat sysstat atop htop python-glade2 lm-sensors zlib1g-dev uuid-dev libmnl-dev gcc make autoconf autoconf-archive autogen automake pkg-config curl python python-yaml python-mysqldb python-psycopg2 nodejs lm-sensors netcat git sudo nethogs iotop pve-headers subversion openvswitch-switch software-properties-common locate debhelper autotools-dev dkms zlib1g-dev quilt python-libxml2 swig dpatch graphviz chrpath lshw net-tools flex bison tcl tk gfortran nfs-kernel-server samba samba-common

zfs create -V 32G -b $(getconf PAGESIZE) -o compression=zle \
      -o logbias=throughput -o sync=always \
      -o primarycache=metadata -o secondarycache=none \
      -o com.sun:auto-snapshot=false rpool/swap

mkswap -f /dev/zvol/rpool/swap
echo /dev/zvol/rpool/swap none swap defaults 0 0 >> /etc/fstab
swapon -av

Glances:
curl -L https://bit.ly/glances | /bin/bash

Netdata:
git clone https://github.com/firehol/netdata.git --depth=1
cd netdata

modprobe tcp_bbr
echo "tcp_bbr" >> /etc/modules-load.d/modules.conf
echo "vfio" >> /etc/modules-load.d/modules.conf
echo "vfio_iommu_type1" >> /etc/modules-load.d/modules.conf
echo "vfio_pci" >> /etc/modules-load.d/modules.conf
echo "vfio_virqfd" >> /etc/modules-load.d/modules.conf
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
echo "vm.swappiness = 10" >> /etc/sysctl.conf
echo "fs.inotify.max_user_watches = 10240" >> /etc/sysctl.conf
echo "fs.inotify.max_user_instances = 10240" >> /etc/sysctl.conf

sysctl -p

nano /etc/default/grub
intel_iommu=on iommu=pt
update-grub

echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf

update-initramfs -u -k all
Share this Post