Proxmox Virtual Environment (Proxmox VE) is an open source virtualization system based on Debian GNU / Linux. Developed by the Austrian company Proxmox Server Solutions GmbH, sponsored by the Internet Foundation Austria.
It uses KVM and OpenVZ as hypervisors. Accordingly, it is able to perform any supported KVM OS (Linux, * BSD, Windows and others) with minimal loss of performance and lossless Linux.
Virtual machine management and server administration are performed via the web interface or via the standard Linux command line interface.
There are many options available for the virtual machines being created: used hypervisor, storage type (image file or LVM), type of emulated disk subsystem (IDE, SCSI or VirtIO), type of network card emulated, number of processors available, and others.
Key features
- Simple web-based management;
- Load monitoring in real time;
- Library of installation images (in local or remote storage);
- Connecting to the "physical" console of guest systems directly from the browser (via VNC);
- Combining servers into a cluster with the possibility of live migration of virtual machines (without stopping the guest system);
- Quick deployment of guest systems from templates (available only for OpenVZ);
- Automatic backup of virtual machines.
nano /etc/hosts
127.0.0.1 localhost xxxx test.xxxx.info test # # IPv6 ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts x:x:x:4105::2 test.xxxx.info
nano /etc/hostname
test
echo "Europe/Moscow" > /etc/timezone dpkg-reconfigure -f noninteractive tzdata
mkdir -p /etc/apt/sources.list.d/
cd /etc/apt/sources.list.d/ wget http://sycraft.info/share/debian7/sources.list.d/debian7.list wget http://sycraft.info/share/debian7/sources.list.d/dotdeb7.list wget http://sycraft.info/share/debian7/sources.list.d/neurodebian.sources7.list wget http://sycraft.info/share/debian7/sources.list.d/proxmox7.list
cd /root/ wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991 apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9 wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add - rm *.gpg
apt-get update && apt-get upgrade -f -y
apt-get install ntp screen mc git ntpdate sudo zip unzip pigz locales tzdata nano aptitude htop iotop sysstat rkhunter chkrootkit nscd lsof strace subversion multitail -y -f
apt-get install pve-firmware pve-kernel-2.6.32-26-pve -y -f apt-get install pve-headers-2.6.32-26-pve -y -f
apt-get remove linux-image-amd64 linux-image-3.2.0-4-amd64 -y -f
update-grub
reboot
apt-get install proxmox-ve-2.6.32 ntp ssh lvm2 postfix ksm-control-daemon vzprocps open-iscsi bootlogd -y
rm -fr /etc/apt/sources.list.d/pve-enterprise.list
nano /etc/vz/vz.conf
IPTABLES="ipt_owner ipt_REDIRECT ipt_recent ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ipt_state iptable_nat ip_nat_ftp"
nano /etc/modules
ipt_MASQUERADE ipt_helper ipt_REDIRECT ipt_state ipt_TCPMSS ipt_LOG ipt_TOS tun iptable_nat ipt_length ipt_tcpmss iptable_mangle ipt_limit ipt_tos iptable_filter ipt_helper ipt_tos ipt_ttl ipt_REJECT loop
iptables-save > /etc/iptables.up.rules
nano /etc/iptables.up.rules
*nat :PREROUTING ACCEPT [2164:136969] :POSTROUTING ACCEPT [58:3659] :OUTPUT ACCEPT [0:0] -A PREROUTING -d xx16.182/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination 192.168.8.2:22 -A POSTROUTING -o vmbr0 -j MASQUERADE -A POSTROUTING -d xx16.182 -p tcp -s 192.168.8.0/24 --dport 22 -j SNAT --to-source xx16.182 COMMIT
iptables-restore < /etc/iptables.up.rules
cd /var/lib/vz/template/cache/ wget http://download.openvz.org/template/precreated/debian-7.0-x86_64.tar.gz wget http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz wget http://download.openvz.org/template/precreated/ubuntu-13.10-x86_64.tar.gz
cd /var/lib/vz/template/iso/ wget http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/virtio-win-0.1-74.iso
cat /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address xx16.182 netmask 255.255.255.224 pointopoint xx16.129 gateway xx16.129 dns-nameservers 8.8.8.8 auto vmbr0 iface vmbr0 inet static address xx16.182 netmask 255.255.255.224 bridge_ports none bridge_stp off bridge_fd 0 pre-up iptables-restore < /etc/iptables.up.rules up ip route add xx150/32 dev vmbr0 # auto vmbr1 iface vmbr1 inet static address 192.168.8.100 netmask 255.255.0.0 bridge_ports none bridge_stp off bridge_fd 0
nano /etc/network/interfaces # network interface settings auto lo iface lo inet loopback auto eth0 iface eth0 inet manual auto vmbr0 iface vmbr0 inet static address xx16.182 netmask 255.255.255.0 gateway xx16.1 dns-nameservers 8.8.8.8 bridge_ports eth0 bridge_stp off bridge_fd 0 pre-up iptables-restore < /etc/iptables.up.rules auto vmbr1 iface vmbr1 inet static address 192.168.8.100 netmask 255.255.0.0 bridge_ports none bridge_stp off bridge_fd 0
nano /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address xxx150 netmask 255.255.255.255 pointopoint xx16.182 gateway xx16.182 pre-up iptables-restore < /etc/iptables.up.rules auto eth1 iface eth1 inet static address 192.168.8.1 netmask 255.255.0.0
nano /etc/iptables.up.rules
*nat :PREROUTING ACCEPT [2164:136969] :POSTROUTING ACCEPT [58:3659] :OUTPUT ACCEPT [0:0] -A PREROUTING -d xxx150/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.8.5:22 -A POSTROUTING -o eth0 -j MASQUERADE -A POSTROUTING -d xxx150 -p tcp -s 192.168.8.0/24 --dport 80 -j SNAT --to-source xxx150 COMMIT
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf sysctl -p
apt-get purge -y -f openssh-server postfix ssh samba bind9 sendmail apache2*apt-get autoremove -y
Source: https://habr.com/ru/post/204190/
All Articles