User Tools

Site Tools


технология_openvz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
технология_openvz [2011/10/24 17:19]
val
технология_openvz [2012/02/21 10:40]
val
Line 2: Line 2:
  
 [[http://​ru.wikipedia.org/​wiki/​OpenVZ]] [[http://​ru.wikipedia.org/​wiki/​OpenVZ]]
 +
 +===== Ubuntu 10.04 =====
  
 [[https://​help.ubuntu.com/​community/​OpenVZ]] [[https://​help.ubuntu.com/​community/​OpenVZ]]
  
-===== Установка ====+==== Сборка ядра с поддержкой OpenVZ ​====
-<​code>​ +
-root@hostX:​~#​ sudo apt-get install linux-openvz vzctl +
-</​code>​ +
- +
-What would you like to do about menu.lst? +
- +
-install the package maintainer'​s version+
  
 +[[http://​wiki.openvz.org/​Download/​kernel/​2.6.32/​2.6.32-feoktistov.1]]
 +==== Установка утилит OpenVZ и настройка хост машины ====
 <​code>​ <​code>​
-root@hostX:~# shutdown ​-r now+root@gate:~# apt-get install linux-openvz vzctl
  
-root@hostX:~# uname -a +root@gate:~# cat /etc/sysctl.d/​10-openvz.conf 
- +</​code><​code>​ 
-root@hostX:~# cat /​etc/​sysctl.conf +net.ipv4.conf.default.forwarding = 1 
-... +net.ipv4.conf.default.proxy_arp = 1 
-net.ipv4.conf.default.forwarding=1 +net.ipv4.ip_forward = 1
-net.ipv4.conf.default.proxy_arp=1 +
-net.ipv4.conf.eth0.proxy_arp = 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@hostX:~# sysctl -p +root@gate:~# ln -s /var/lib/vz /vz
- +
-root@hostX:~# ln -s /var/lib/vz /vz+
 </​code>​ </​code>​
  
-===== Создание виртуальной машины ​=====+==== Создание виртуальной машины ====
 <​code>​ <​code>​
-hostX:~# cd /​var/​lib/​vz/​template/​cache/​ +root@gate:~# cd /​var/​lib/​vz/​template/​cache/​
-hostX:~# wget +
  
-http://​download.openvz.org/​template/​precreated/​contrib/​ubuntu-8.04.2-i386-minimal.tar.gz +root@gate:​...#​ wget http://​download.openvz.org/​template/​precreated/​contrib/​ubuntu-10.04-minimal_10.04_i386.tar.gz
-hostX:~# cd  +
-hostX:~# vzctl create 101 --ostemplate ubuntu-8.04.2-i386-minimal+
  
-hostX:~# vzctl set 101 --ipadd 172.16.1.100+X ​--save +root@gate:~# vzctl create ​101 --ostemplate ubuntu-10.04-minimal_10.04_i386
-hostX:~# vzctl set 101 --hostname serverX.class.un ​--save +
-hostX:~# vzctl set 101 --nameserver 172.16.1.50 --save+
  
-root@hostX:~# cat /​etc/​vz/​conf/​101.conf+root@gate:~# vzctl set 101 --ipadd 172.16.1.100+X --save 
 +root@gate:​~#​ vzctl set 101 --hostname server.corpX.un --save 
 +root@gate:​~#​ vzctl set 101 --nameserver 172.16.1.254 --save 
 + 
 +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
  
-hostX:~# vzctl start 101 +root@gate:~# vzctl enter 101 
-hostX:~# vzctl enter 101 +</​code>​
-</code +
->+
технология_openvz.txt · Last modified: 2013/05/22 13:50 (external edit)