8.2.6.4. Vytvoření virtuálního serveru kiki na počítači oritu

rcsinfo="$Header: /home/radek/cvs/unix-book/unix.xml,v 1.7 2009-03-07 03:52:40 radek Exp $"

Nejdříve si stáhneme skript pro vytváření virtuálních serverů

# cd ~/bin
# wget http://www.paul.sladen.org/vserver/debian/debian-newvserver.sh
# chmod u+x debian-newvserver.sh

a upravíme

--- debian-newvserver.sh.orig   Sat Apr  3 19:15:52 2004
+++ debian-newvserver.sh        Sat Apr  3 19:27:40 2004
@@ -10,7 +10,7 @@
 # Configurable items:
 
 # Root directory of your virtual servers (probably shouldn't change this)
-VSERVER_ROOT="/vservers"
+VSERVER_ROOT="/var/lib/vservers"
 
 # Packages to install in addition to the base defaults
 # MUST INCLUDE ALL DEPENDENCIES (seperated by "," commas)
@@ -28,13 +28,13 @@
 
 # Architecture: overide on non-Debian host such as Redhat
 # otherwise dpkg will detect whether we are i386/powerpc/sparc/etc
-ARCH=""
+ARCH="i386"
 
 # Which debian distribution (warning: this has only been tested with woody)
 DIST="woody"
 
 # Local or nearest location of a debian mirror (must include the `/debian')
-MIRROR="http://ftp.uk.debian.org/debian"
+MIRROR="http://www.debian.cz/debian"
 
 # Default network interface for vservers:
 INTERFACE="eth0"

Připravíme se adresář pro náš virtuální server

# mkdir /home/vserver/kiki
# ln -s /home/vserver/kiki /var/lib/vservers/

a můžeme instalovat

# export LANG=C
# bin/debian-newvserver.sh --hostname kiki --domain giga-net.cz \
                           --ip 213.29.4.55 --dist woody