A Copy-n-Paste VServer Guide for Ubuntu 5.10 Breezy (in 15min?!) -- by LCamel
This is not a complete guide for VServer. It just tries to give you a quick(and dirty?) way to get your feet wet with VServer. Please visit http://linux-vserver.org/ for the official documents.
# find a spare machine and install ubuntu using the "server" option
# if you prefer working remotelly
sudo apt-get install ssh screen
# install a vserver-patched kernel
sudo cp /etc/apt/sources.list /etc/apt/sources.list.orig
sudo sh -c "echo 'deb http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/ breezy uniklu-vserver' > /etc/apt/sources.list"
wget http://ubuntu.uni-klu.ac.at/uniklu-debuild.pub -O ~/uniklu-debuild.pub
sudo apt-key add ~/uniklu-debuild.pub
sudo apt-get update
sudo apt-get install linux-image-2.6.12-11-686
sudo reboot
# install required utilities
sudo sh -c "echo 'deb http://tw.archive.ubuntu.com/ubuntu breezy main universe' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get install util-vserver debootstrap
# restore the old config
sudo cp /etc/apt/sources.list.orig /etc/apt/sources.list
sudo apt-get update
# execute vprocunhide manually without rebooting to fix /proc entries visibility
sudo /etc/init.d/vprocunhide start
# build a vserver instance WITH YOUR OWN SETTINGS
MYVS=myvs1
sudo vserver $MYVS build -n $MYVS --hostname my.host.name --interface eth0:192.168.1.123/24 -m debootstrap -- -d breezy -m file:///media/cdrom0/
sudo vserver $MYVS start
sudo vserver-stat
sudo vserver $MYVS enter
# type "exit" to leave
sudo vserver $MYVS stop
# destroy a vserver
# if [ -n "$MYVS" ]; then sudo rm -fR /var/lib/vservers/$MYVS /etc/vservers/$MYVS; fi
References:
https://wiki.ubuntu.com/VServer
http://www.howtoforge.com/linux_vserver_debian
http://linux-vserver.org/
No comments:
Post a Comment