Professional Documents
Culture Documents
Contenido
Vitalización con OpenVz sobre Debian Lenny ............................................................................. 1
Instalando WebVz .................................................................................................................... 4
Instalación del OpenVZ
La siguiente guía de instalación del servidor OpenVz va dirigida para la
distribución de Linux Debian.
• Creando una VE
o vzctl create ID-VE –ostemplate nombre_plantilla
o recuerden que las plantillas deben de estar en
/var/lib/vz/template/cache
• Iniciando y deteniendo VE
o vzctl start ID-VE
o vzctl stop ID-VE
• Listando VE dentro del sistema
o Vzlist –a
• Ingresar a una VE
o Vzctl enter ID-VE
• Eliminar una VE
o vzctl destroy ID-VE
Para crear una VE de forma más automática y personalizada podemos hacer uso
del script create.vm.sh
#!/bin/sh
#
# Create an server virtual machine. - This one for
# checking Centos 5.2 operation - running Elastix (asterisk plus e
#xtra)
#
VID=71
vzctl create $VID --ostemplate centos-5-x86 --config vps.basic
vzctl set $VID --onboot yes --save
vzctl set $VID --hostname elastix.bozo.com --save
vzctl set $VID --ipadd 192.168.2.$VID --save
vzctl set $VID --nameserver 200.26.137.135 --save
vzctl set $VID --userpasswd root:elastix
vzctl start $VID
echo " RUN : vzctl exec $VID passwd "
echo " Boost up the quota for disk and memory space "
#
# Restart the Virtual machine - so that it gets the IP addresses,
etc.
#
vzctl restart $VID
#
# Where do we start here - install using yum
Administración por WebVz:
Instalando WebVz
• cd /usr/local
• wget http://dfn.dl.sourceforge.net/sourceforge/webvz/webvz.2.0.tar.gz
• tar xvfz webvz.2.0.tar.gz
• mv webvz.2.0 webvz
• cd webvz
• ln -s /var/lib/vz /vz
• ln -s /usr/bin/irb1.8 /usr/bin/irb
• mkdir /etc/sysconfig
• ln -s /etc/vz/conf /etc/sysconfig/vz-scripts
• cd /etc/ini.d
• vi webvz.sh
o Añade dentro de webvz.sh
cd /usr/local/webvz/
/usr/bin/ruby script/server &> /dev/null &
• chmod +x webvz.sh
• update-rc.d webvz.sh defaults
Compartiendo Internet del servidor contenedor de las VE
## FLUSH de reglas
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
## Empezamos a filtrar
## Nota: eth2 es el interfaz conectado al router y eth0 a la LAN
# El localhost se deja (por ejemplo conexiones locales a mysql)
http://linuxsan.wordpress.com/2008/02/07/openvz-mi-primera-toma-de-contacto/
http://wiki.openvz.org/Virtual_network_device
http://www.elastix.org/index.php?option=com_fireboard&Itemid=55&func=view&catid=1&id=15425
http://www.elastix.org/index.php?option=com_openwiki&Itemid=27&id=how-
to_install_elastix_from_centos5
http://wiki.openvz.org/Category:Networking
http://wiki.openvz.org/Differences_between_venet_and_veth
http://wiki.openvz.org/Installation_on_Debian
http://wiki.openvz.org/Creating_a_CentOS_5.0_Template
http://forum.openvz.org/index.php?t=tree&goto=36691&#msg_36691
http://www.elastix.org/index.php?option=com_openwiki&Itemid=27&id=how-
to_install_elastix_from_centos5
http://www.howtoforge.com/managing-openvz-with-the-webvz-control-panel-on-debian-lenny
http://www.pantz.org/software/tcpip/subnetchart.html
http://www.solusan.com/como-va-update-rcd-niveles-de-ejecucion-en-debian.html