This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
технология_openvz [2012/02/21 10:04] val |
технология_openvz [2012/02/21 10:39] val |
||
---|---|---|---|
Line 10: | Line 10: | ||
[[http://wiki.openvz.org/Download/kernel/2.6.32/2.6.32-feoktistov.1]] | [[http://wiki.openvz.org/Download/kernel/2.6.32/2.6.32-feoktistov.1]] | ||
- | |||
==== Установка утилит OpenVZ ==== | ==== Установка утилит OpenVZ ==== | ||
<code> | <code> | ||
root@gate:~# apt-get install linux-openvz vzctl | root@gate:~# apt-get install linux-openvz vzctl | ||
- | root@gate:~# cat /etc/sysctl.conf | + | root@gate:~# cat /etc/sysctl.d/10-openvz.conf |
- | ... | + | </code><code> |
- | net.ipv4.conf.default.forwarding=1 | + | net.ipv4.conf.default.forwarding = 1 |
- | net.ipv4.conf.default.proxy_arp=1 | + | net.ipv4.conf.default.proxy_arp = 1 |
- | net.ipv4.conf.eth0.proxy_arp = 1 | + | net.ipv4.ip_forward = 1 |
- | + | ||
- | net.ipv4.ip_forward=1 | + | |
net.ipv4.conf.all.rp_filter = 1 | net.ipv4.conf.all.rp_filter = 1 | ||
kernel.sysrq = 1 | kernel.sysrq = 1 | ||
- | net.ipv4.conf.default.send_redirects = 1 | + | net.ipv4.conf.default.send_redirects = 0 |
- | net.ipv4.conf.all.send_redirects = 0 | + | </code><code> |
root@gate:~# sysctl -p | root@gate:~# sysctl -p | ||
root@gate:~# ln -s /var/lib/vz /vz | root@gate:~# ln -s /var/lib/vz /vz | ||
</code> | </code> | ||
- | |||
==== Создание виртуальной машины ==== | ==== Создание виртуальной машины ==== | ||
<code> | <code> | ||
Line 45: | Line 40: | ||
root@gate:~# cat /etc/vz/conf/101.conf | root@gate:~# cat /etc/vz/conf/101.conf | ||
+ | </code><code> | ||
... | ... | ||
IP_ADDRESS="172.16.1.100+X" | IP_ADDRESS="172.16.1.100+X" | ||
HOSTNAME="serverX.class.un" | HOSTNAME="serverX.class.un" | ||
NAMESERVER="172.16.1.50" | NAMESERVER="172.16.1.50" | ||
+ | </code><code> | ||
+ | root@gate:~# vzctl start 101 | ||
- | root@gate:~# vzctl start 101 | ||
root@gate:~# vzctl enter 101 | root@gate:~# vzctl enter 101 | ||
</code> | </code> | ||
- |