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.
You're a fan of [Fedora Linux]? You want to play around with Linux-VServer's or use them in production? But you are new to this and want an easy way to (quickly) start with a running system?
Note: If you didn't want a VServer installation guide to Fedora Core 5, maybe you were searching for a guide like this: [The Perfect Setup - Fedora Core 5 (64 bit)]
This guide is aimed to assist you in a plain and basic installation "from scratch" to a running VServer enabled host system with also one installed basic guest system. It is assumed that you have basic knowledge of Linux administration and Fedora 5.
Page Index / Contents
What you need:
- The Fedora Core installation CDs (you can get a list of mirrors from the [fedora website])
- a bit of clue in server administration (to avoid another bot system in the net)
- working internet access (of course) to download remaining stuff
- enough time to work through this guide (and probably enough coffee and pizza ;-) )
What you don't need:
- Money (this guide is based on free available soures; [donations] to the developers are appreciated though)
- paid support tickets (they won't assist you - better look on the [Mailing List] or on the IRC channel)
[Page Index]
Okay, let's start:
1. installing the host system
- boot from the FC5 CD and install a basic system (e.g. custom and "minimal" plus development tools; main services should always run on the guest system)
- Hint: It usually makes sense to create a '/vservers' partition to contain the guest systems - if you need more space, you can easily move that partition to a new, larger disc and prevent long downtimes
- IMPORTANT: SElinux must be deactivated (unless you know exactly what you're doing!)
SELINUX=disabled
- log into the installed system and upgrade it to the latest updates
- Hint: You may want to exclude kernel updates in your update repo to prevent unnecessary download of kernels as shown in [Step 2] below.
yum -y upgrade
[Page Index]
2. Installing a vserver enabled kernel
- IMPORTANT: There are two methods of installing a vserver kernel on Fedora Core 5: from source and [from precompiled RPM]. Use one or the other. Do not use both. As Daniels RPMs have been proven stable for a longer period and are both available on i386 and x86_64, it is the recommended method and the only further described one.
- You should make sure that Fedora Core kernels don't take precedence over the vserver kernels, do this by adding exclude=kernel to /etc/yum.repos.d/fedora-updates.repo. Same relates to yum as Daniel supplies a more secure and patched chroot-Version.
- The repos might look something like this when you're done:
- /etc/yum.repos.d/fedora-updates.repo:
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
exclude=kernel kernel-smp yum
[Page Index]
A. Installing the host kernel from rpm
- [Daniel Hokka Zakrisson] has provided [rpms] for both the vserver-kernel and util-vserver software. To activate his repository of software add the following file to your /etc/yum.repos.d/ directory:
[dhozac-vserver]
name=Daniel Hokka Zakrisson's packages for Fedora $releasever - $basearch - vserver
baseurl=http://rpm.hozac.com/dhozac/fedora/$releasever/vserver/$basearch
http://muh.at/dhozac/fedora/$releasever/vserver/$basearch
gpgkey=http://rpm.hozac.com/fedora/conf/keys/RPM-DHOZAC-GPG-KEY
enabled=1
- Once the repository is added issue the following command to install the vserver kernel.
- For Single processor systems
yum install kernel
-
- Hint: x86_64 on FC5 is always smp, so use kernel only on that
yum install kernel-smp
- reboot your system and continue with [step 3].
[Page Index]
3. Installing the vserver utilities on the host system
- IMPORTANT: Like the vserver kernel, util-vserver can be installed either from source or [from precompiled RPM]. The use of both *will* result in problems, so choose only one or the other!
- Same as with the host system, using Daniels rpms is proven stable and therefore recommended and described only.
- Hint: Daniel provided a chroot yum in his repository which supplies several security patches, his util-vserver packages honor this - so you should use his .chroot version (see [above]).
[Page Index]
A. Installing the vserver utilities system from rpm
- Issue the following command to install the vserver utils (assuming you have enabled Daniel Hokka Zakrisson's repo as mentioned [above]).
yum install util-vserver{,-core,-lib,-sysv,-build}
Now continue with [step 4]
[Page Index]
4. Build your first guest system
- IMPORTANT: It is wise to prepare your vserver build command "on paper" before rushing ahead as a rebuild will take several minutes. For a list and description of all vserver build options read the output of vserver XXX build --help
- Set up your vserver using your prepared command. It should look similar to the following.
vserver gast build -m yum --context 42 --hostname=gast.example --interface gast0=eth0:192.168.0.1/24 -- -d fc5
- To install further packages to the guest from the host use vyum <vservername> -- install <package> if you choose not to internalize package management. If you are using internal package management you must use yum install <package> from within the guest system (see [step 5]).
[Page Index]
5. Things you might want to consider / remember
- IMPORTANT: Before you can use the yum (or the apt) command from within a guest you must activate internal package management as shown below. If you only want a managed guest, do not install yum on the guest and do not activate internal package management!
- Hint: For software install to your guest it naturally needs working internet access and dns resolution to download its packages.
- 2nd Hint: Changes to package management can only be done when guest is not running.
# to enable unmanaged guest
vyum gast -- install yum
vserver gast running && vserver gast stop
vserver gast pkgmgmt internalize
- Probably helpful and/or necessary rpm packages to install into each guest:
- yum (if you want internal package management / unmanaged guests)
- openssh-server (if you want to have remote shell access)
- rootfiles (always good if you want to use "root" usage)
- vim-minimal (or any other editor you might like to edit any text file, e.g. joe, nano)
- passwd (otherwise you will not be able to change your passwords)
- which (always helpful)
- vixie-cron, crontabs (to have a working crond/crontabs)
- sendmail or postfix (to have a mailsystem as well, you may use any preferred mailer)
- xinetd (if you want rpc services)
- pure-ftpd (if you want to run a ftp-server which may take user's from a database; needs to be rebuilt --without-capabilities to work within a guest system)
- Caution: On FC4/FC5 guests, pam authentication (also used with openssh) enables "pam_loginuid.so" in the /etc/pam.d/* files. Comment those out as they are not necessary and will not load within a guest anyway. This probably is also necessary on updates later on, if the configs get changed. You therefore may add the following command line to a cronjob file or your software update script:
/bin/sed --in-place -e "s/^session.*required.*pam_loginuid.so/# session\trequired\tpam_loginuid.so/g" /etc/pam.d/*
- After you've installed and configured your services within the guest OS it's always a good idea (i.e it is necessary!) to ensure that each server instance binds only to its relating ip(s) to avoid annoying IP conflict. This hint also relates to the host system, especially SSH service!
- If you want your new guest to start on host bootup, add a one-line tag to /etc/vservers/<vserver-name>/apps/init/mark. All marked vservers will be activated with a corresponding a /etc/init.d/vservers-<tag> script (usually just a copied and renamed /etc/init.d/vservers-default)
echo default >/etc/vservers/gast/apps/init/mark
chkconfig vservers-default on
[Page Index]
6. Configure your (first) guest system
- You can now "boot" into the system.
vserver gast start
vserver gast enter
- You are now booted into your brand new VServer. A few things need to be set up before you can get going however
- Create a shadow file within the guest and check it for errors:
pwconv
pwck
passwd root
- Add a valid nameserver into /etc/resolv.conf so that the guest can use one
- example: /etc/resolv.conf:
nameserver 192.168.0.1
- Change the guest timezone: Since FC5 deprecates the textmode system-config-date and depends it on X (which relates to ~60 "overhead RPM's"!), use the following info to change timezone in textmode (if required):
- identify your timezone location from /usr/share/zoneinfo
- copy this file to /etc/localtime (replacing the file there) - that's it
- example:
cp -f /usr/share/zoneinfo/Europe/Vienna /etc/localtime
[Page Index]
If you want some special procedure described on this page (which should be of public interest), either add yourself (you're welcome) or [mail to the autor]. Please do NOT mail the author for any support purposes, use the mailing list or IRC channel instead!
For further issues like more fine-grained configuration etc. please read through the further documentation on this site.