| 1 | = 2013-08-29 = |
| 2 | |
| 3 | == OpenVZ & ovz-web-panel == |
| 4 | |
| 5 | * [參考] |
| 6 | * [參考] http://code.google.com/p/ovz-web-panel/ |
| 7 | |
| 8 | === 安裝 OpenVZ === |
| 9 | |
| 10 | * Ubuntu 目前沒有套件,Debian 才有。官方只有提供 RPM 套件。 |
| 11 | {{{ |
| 12 | apt-get -y install linux-image-openvz-686 vzctl vzquota vzdump |
| 13 | ln -s /var/lib/vz /vz |
| 14 | cat >> /etc/sysctl.conf << EOF |
| 15 | net.ipv4.conf.all.rp_filter=1 |
| 16 | net.ipv4.icmp_echo_ignore_broadcasts=1 |
| 17 | net.ipv4.conf.default.forwarding=1 |
| 18 | net.ipv4.conf.default.proxy_arp = 0 |
| 19 | net.ipv4.ip_forward=1 |
| 20 | kernel.sysrq = 1 |
| 21 | net.ipv4.conf.default.send_redirects = 1 |
| 22 | net.ipv4.conf.all.send_redirects = 0 |
| 23 | net.ipv4.conf.eth0.proxy_arp=1 |
| 24 | EOF |
| 25 | sysctl -p |
| 26 | cat /etc/vz/vz.conf | grep NEIGHBOUR_DEVS |
| 27 | sed -i 's#NEIGHBOUR_DEVS=detect#NEIGHBOUR_DEVS=all#' /etc/vz/vz.conf |
| 28 | cat /etc/vz/vz.conf | grep NEIGHBOUR_DEVS |
| 29 | reboot |
| 30 | }}} |