We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the Wiki Team page for instructions how to help or browse through our new wiki at wiki.linux-vserver.org to find the information already migrated.
So you're eager to use Linux-VServer? Great! This document should help you to get there. It is assumed that you have basic knowledge about building a custom kernel, i.e. that you know which stuff to turn on in the kernel configuration. Of course some Linux-VServer-specific options are explained here (if I feel that there's a need for it).
Note: The instructions throughout this tutorial are doable with a regular user account, there's absolutely no need to do everything as root. If you need to become root, the instructions tell you about it!
You'll need the vanilla kernel sources from [kernel.org] and (of course) a Linux-VServer patch for the kernel you intend to use. At the time of the writing of this document, the patches for the 2.6 kernel series are considered development, there's no stable release yet. Nevertheless, the patches tend to be at least as stable as the 2.6 kernel itself ;). The development patches can be found [here], more experimental patches (and sometimes also fixes which haven't made it into a release yet) can be found [here], as long as there is no stable release, it might prove useful to ask for the best choice of patches on our irc channel (#vserver @ OFTC).
In this document, I'll just use Linux 2.6.11.5 and Linux-VServer 1.9.5.
# Create a directory for our sources mkdir ~/src # Switch to that directory cd ~/src # Get Linux 2.6.11.5 sources wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.5.tar.bz2 # Get the Linux-VServer 1.9.5 patch wget http://www.13thfloor.at/vserver/d_rel26/v1.9.5/patch-2.6.11.5-vs1.9.5.diff.bz2 # Extract the vanilla sources tar xjf linux-2.6.11.5.tar.bz2 # Create a hard-linked copy of the vanilla sources, this will get the Linux-VServer patch applied cp -la linux-2.6.11.5 linux-2.6.11.5-vs1.9.5 # Switch to that new directory cd linux-2.6.11.5-vs1.9.5 # Patch the sources bzip2 -dc ../patch-2.6.11.5-vs1.9.5.diff.bz2 | patch -p1
Now we got two sources, the vanilla sources for 2.6.11.5 and the Linux-VServer sources for 2.6.11.5-vs1.9.5. As they are copied hard-linked, the space consumption for the second source tree is very small, only the files changed by the Linux-VServer patch use any additional disk space.
I'll only explain some of the Linux-VServer-specific kernel configuration options here (as of 1.9.5), the rest is up to you ;). You can choose whatever configuration method you like, for example:
# Configure the kernel using a ncurses based menu make menuconfig
Now that we have configured the kernel the way we want it, it's time to build it.
# Build the kernel make
If you don't happen to have a really fast box, it is a good time to get a new cup of coffee now ;)
This really depends on your setup, if you don't know how to do this at all, please ask google for some howto.
After you've installed your kernel and setup your bootloader, it's time to reboot. If the kernel doesn't boot, check your kernel and bootloader configuration, if you absolutely can't figure out what's wrong, try asking on irc (#vserver @ OFTC).
The kernel alone won't help you, you also need some tools to exploit all those new features you got, so let's get them.
The latest tools can be found [here]. For the Linux-VServer on 2.6 kernels you should use the alpha tools, as only those support the new features (and don't worry, they're also pretty rock-stable). I'll use util-vserver 0.30.205 in this document, you should use whatever is latest.
While configuring the tools you may get some error messages about missing stuff, for example dietlibc, vconfig and e2fs headers. The error messages are accompanied by explanations what you should do, so read them carefully.
# Go to our source directory cd ~/src # Get the sources for alpha util-vserver wget http://www.13thfloor.at/~ensc/util-vserver/files/alpha/util-vserver-0.30.205.tar.bz2 # Extract the sources tar xjf util-vserver-0.30.205.tar.bz2 # Switch to the util-vserver source directory cd util-vserver-0.30.205 # Configure the sources (you may want to adjust settings here, the defaults work, but may not suite your needs) ./configure # Build the tools make # Become root su - # Install the tools make install # Back to our regular user exit
Now we got our tools in place and we're ready to build our first vserver!
Wait! We're not ready yet. To be sure that your setup works fine, we got a test script that checks some basic functionality. So download the [testme.sh] script and check if everything's fine.
# Back to our source directory cd ~/src # Get the script wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh # Make it executable chmod +x testme.sh # Become root su # Run the test script ./testme.sh # Back to our regular user exit
If the script shows any errors, feel free to join us on irc (#vserver @ OFTC) or ask on the [mailing list]. If you ask on the mailing list, don't forget to include your kernel version, the version of the Linux-VServer patch, the version of util-vserver and of course the output of the test script.
OK, now that we know, that our system is alright, we can finally build a vserver.
To be written, in the meantime take a loot at the alpha util-vserver page for some help on building vservers.