{"id":268855,"date":"2015-11-24T10:35:03","date_gmt":"2015-11-24T07:35:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=268855"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=268855","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LXC \u043d\u0430 Debian 8"},"content":{"rendered":"<p>       \u041d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Debian \u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OpenVZ. \u041e\u043d\u0430 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0430, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043f\u043e\u0440\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430 Debian 8 Jessie \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435 \u0448\u043b\u0430 \u043d\u0438 \u043f\u043e\u0434 \u043a\u0430\u043a\u0438\u043c \u0441\u043e\u0443\u0441\u043e\u043c. \u041f\u043e\u0437\u0436\u0435 \u043c\u043e\u0438 \u0434\u043e\u0433\u0430\u0434\u043a\u0438 \u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f OpenVZ \u043d\u0430 Debian 8 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435 \u043d\u0430\u0448\u043b\u0438 \u0441\u0432\u043e\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 toster.ru. \u0422\u0430\u043c \u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u2014 LXC, \u0447\u0442\u043e \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u041a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0448\u0443 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 LXC \u043d\u0430 Debian Jessie.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 LXC \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2013 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n<p>  \u041f\u043e\u043a\u0430 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"dos\">apt-get install lxc lxctl lxc-templates <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u0438, \u0447\u0442\u043e \u0438 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0430. \u0410\u0434\u0440\u0435\u0441 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u044b: 192.168.0.10, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 192.168.0.11-192.168.0.20. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u0441\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 bridge-utils:<\/p>\n<pre><code class=\"dos\">apt-get install bridge-utils <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041b\u0443\u0447\u0448\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u044b.<br \/>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0442\u0438 \u0432 \/etc\/networks\/interfaces:<\/p>\n<pre><code class=\"dos\"># allow-hotplug eth0 # iface eth0 inet dhcp <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0441\u0442\u0430 \u0442\u0443\u0434\u0430 \u0436\u0435:<\/p>\n<pre><code class=\"dos\">auto br0    iface br0 inet static     bridge_ports eth0     bridge_fd 0     bridge_hello 2     bridge_maxage 12     bridge_stp off     address 192.168.0.10     netmask 255.255.255.0     gateway 192.168.0.1     broadcast 192.168.0.255 <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0441\u0442:<\/p>\n<pre><code class=\"bash\">brctl addbr br0 ifconfig eth0 down brctl setfd br0 0 brctl addif br0 eth0 ifconfig eth0 0.0.0.0 up ifconfig bdr0 192.168.1.2\/24 up route add default gw 192.168.1.1 <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u0435\u043d. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443, \u0441\u0432\u044f\u0437\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043c\u043e\u0441\u0442. \u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0431\u0443\u0442\u043d\u0443\u0442\u044c\u0441\u044f \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u043e\u0434\u043d\u044f\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<pre><code class=\"dos\">#ifconfig br0       Link encap:Ethernet  HWaddr 3c:d9:2b:0c:26:91           inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0           inet6 addr: fe80::3ed9:2bff:fe0c:2691\/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:4424607 errors:0 dropped:0 overruns:0 frame:0           TX packets:7829837 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           RX bytes:268042187 (255.6 MiB)  TX bytes:11251410291 (10.4 GiB)  eth0      Link encap:Ethernet  HWaddr 3c:d9:2b:0c:26:91           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:4509932 errors:0 dropped:0 overruns:0 frame:0           TX packets:8137429 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:475678060 (453.6 MiB)  TX bytes:11302104498 (10.5 GiB)           Interrupt:18  lo        Link encap:Local Loopback           inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1\/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:122 errors:0 dropped:0 overruns:0 frame:0           TX packets:122 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           RX bytes:11992 (11.7 KiB)  TX bytes:11992 (11.7 KiB) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 br0, \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430 \u043d\u0430\u0448\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438. \u042f \u043d\u0435 \u0441\u0442\u0430\u043b \u043c\u0443\u0434\u0440\u0438\u0442\u044c \u0441 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u043c\u0438 \u043a\u0432\u043e\u0442\u0430\u043c\u0438, \u0434\u0430\u0432 \u0432\u0441\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u043c \u0432\u0441\u0451 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435.<\/p>\n<pre><code class=\"dos\">lxc-create -t debian -n test_01 <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430 \u0432 \/var\/lib\/lxc\/&lt;\u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430&gt;<\/p>\n<p>  \u0422\u0430\u043c \u0436\u0435 \u043b\u0435\u0436\u0438\u0442 config. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0438 \u043f\u0440\u0430\u0432\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  <i>\u0412\u0430\u0436\u043d\u043e: \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435.<\/i><\/p>\n<pre><code class=\"bash\"># \u0442\u0438\u043f \u0441\u0435\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b lxc.network.type = veth # \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0441\u0435\u0442\u044c lxc.network.flags = up # \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 lxc.network.name = eth0 # \u0435\u0433\u043e &quot;\u043f\u0430\u0440\u0430&quot; \u0432 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435 lxc.network.veth.pair = veth-01 # \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c lxc.network.link = br0 # \u0448\u043b\u044e\u0437 lxc.network.ipv4.gateway = 192.168.0.1 # MAC \u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 lxc.network.hwaddr = 00:16:3e:6b:c7:5b # IP \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0438 lxc.network.ipv4 = 192.168.0.11\/24 <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443:  <\/p>\n<pre><code class=\"dos\">lxc-start -n test_01 <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 login \u0432 \u043d\u0435\u0451. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435. \u041f\u0430\u0440\u043e\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c! \u041d\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0437\u0430\u0431\u044b\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u0437 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"dos\">chroot \/var\/lib\/lxc\/&lt;\u0438\u043c\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438&gt;\/rootfs <\/code><\/pre>\n<p>  \u0437\u0430\u0442\u0435\u043c:<\/p>\n<pre><code class=\"dos\">passwd <\/code><\/pre>\n<p>  \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c. \u0418 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0443:<\/p>\n<pre><code class=\"dos\">exit <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435 \u0432\u0445\u043e\u0434\u044f \u0432 \u043d\u0435\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"dos\">lxc-start -n test_01 \u2013d <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c:<\/p>\n<pre><code class=\"dos\">lxc-stop \u2013n test_01 <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043b\u043e\u0433 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"dos\">lxc-start --logfile=\/var\/log\/lxc.log -d -n test_01 <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0434\u0430\u0447\u043d\u043e \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f, \u0442\u043e \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0435\u0437 IP \u0441 \u0438\u043c\u0435\u043d\u0435\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<pre><code class=\"dos\">veth-01   Link encap:Ethernet  HWaddr fe:2b:3a:ea:60:3f           inet6 addr: fe80::fc2b:3aff:feea:603f\/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:21888 errors:0 dropped:0 overruns:0 frame:0           TX packets:83943 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:1688238 (1.6 MiB)  TX bytes:65591423 (62.5 MiB) <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c, \u043f\u0440\u043e\u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443 \u0438 \u0437\u0430\u0439\u0442\u0438 \u0432 \u043d\u0435\u0451 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u0421 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"dos\">lxc-console -n test_01 <\/code><\/pre>\n<p>  \u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0436\u0430\u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u00abCtrl+a\u00bb \u0438 \u0437\u0430\u0442\u0435\u043c \u00abq\u00bb. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a:<\/p>\n<pre><code class=\"dos\">lxc-ls \u2013f <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c LXC Web Panel:<\/p>\n<pre><code class=\"bash\">wget https:\/\/lxc-webpanel.github.io\/tools\/install.sh -O - | bash <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u043d\u0435\u0451, \u043d\u0430\u0431\u0440\u0430\u0432 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 <i><a href=\"http:\/\/your_ip_address\">your_ip_address<\/a>:5000\/<\/i>. \u041b\u043e\u0433\u0438\u043d <i>admin<\/i>, \u043f\u0430\u0440\u043e\u043b\u044c <i>admin<\/i>. \u0414\u043b\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f web-\u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">wget https:\/\/lxc-webpanel.github.io\/tools\/update.sh -O - | bash <\/code><\/pre>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434<\/b><\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435, \u043d\u043e \u043c\u043d\u0435 \u043e\u043d\u0430 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0437\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u043c\u0443\u0441\u043e\u0440\u043e\u043c \u0431\u043e\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, LXC \u2013 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0418\u0437\u0443\u0447\u0438\u0432 \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u044f \u0432\u0438\u0436\u0443 \u0432 \u043d\u0435\u0439 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<p>  PS: \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0434\u0430\u0441\u0442 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u0438 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u043c, \u043a\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c LXC \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b\u0438 \u0438 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430:<\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/company\/centosadmin\/blog\/202482\/\">\u041d\u0430\u0448 \u043e\u043f\u044b\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f LXC (Linux Containers) \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Debian Wheezy<\/a><br \/>  <a href=\"http:\/\/xgu.ru\/wiki\/LXC\">http:\/\/xgu.ru\/wiki\/LXC<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/74808\/\">lxc \u2014 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Linux<\/a>       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/271537\/\"> http:\/\/habrahabr.ru\/post\/271537\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Debian \u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OpenVZ. \u041e\u043d\u0430 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0430, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043f\u043e\u0440\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430 Debian 8 Jessie \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435 \u0448\u043b\u0430 \u043d\u0438 \u043f\u043e\u0434 \u043a\u0430\u043a\u0438\u043c \u0441\u043e\u0443\u0441\u043e\u043c. \u041f\u043e\u0437\u0436\u0435 \u043c\u043e\u0438 \u0434\u043e\u0433\u0430\u0434\u043a\u0438 \u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f OpenVZ \u043d\u0430 Debian 8 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435 \u043d\u0430\u0448\u043b\u0438 \u0441\u0432\u043e\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 toster.ru. \u0422\u0430\u043c \u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u2014 LXC, \u0447\u0442\u043e \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u041a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0448\u0443 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 LXC \u043d\u0430 Debian Jessie.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-268855","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268855"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268855\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}