Editing
FedoraHowTo
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Fedora Core 1 How To = This howto is supposed to guide you through the process of installing a new box with fedora core 1, turning it into a host, create a vserver and get it updated to the latest packages available. This HowTo[[HowTo?action=edit|?]] should also work for any earlier version of RedHat[[RedHat?action=edit|?]] linux (like 9.0). Just use install-rh9.0 rather then install-fc1. '''What about Fedora Core 2 and 3?''' This Howto only covers FC1 for the mere reason that FC2/FC3 is based on Linux kernel 2.6 and the current vserver implementation for this series of :kernels is not yet in stable condition. Since anyone in need for a howto should not be bothered to use experimental code more then required, this :howto only deals with the stable branch for a 2.4-series of linux kernels. There'll be a seperate howto for FC2/FC3 once the 2.6-branch of vserver is :declared stable. <span id="a.-requirements"></span> == A. Requirements == # '''What do I need to get started?''' #* The Fedora Core 1 CD Set ( 3 CDs ) #* Internet connection for updates and kernel-download #* a spare computer to install on # '''Do I have to use a blank computer?''' #* This howto assumes you have a blank (read: nothing installed) computer. Vserver doesn't require that of course, but for the the sake of a stable and clean system, it is a requirement of this howto. # '''Do I have to have multiple offical IP Addresses?''' #* Short Answer: Yes #* Long Answer: No, for a start they can be private and you can use Destination-Nat (man iptables) to make services on a vserver available to the outside world. This is not recommended though. <span id="b.-host-installation"></span> == B. Host installation == <ol> <li>'''Fedora Core installation''' It's assumed that you know how to do a basic setup of Fedora Core in general, thus only a few things required/recommended for a vserver system are listed here <ul> <li>Do a minimalistic install - you don't want to use the host server for anything but beeing host</li> <li>If you want to use reiserfs, pass the option "reiserfs" on the fedora boot prompt (warning: ext3 is recommended for the vserver. If you want to use reiserfs with vserver, you have to mount your reiserfs partitions with the "attrs" mount option, or you won't get all the securities of vserver)</li> <li>You'll have to build your own kernel, thus installing the kernel-development group is a good idea</li> <li>Vserver are installed in /vserver, so it might be a good idea to create a seperate partition for them ( make it big enough!! >8 GB for a full install )</li></ul> Besides these hints, do a normal install of Fedora Core 1 on your system.</li> <li>'''Fedora Core update''' Since Core 1 is out for quite some time now, many packages have been updated. To get your system updated, we're going to use 'yum'. The default setup uses the redhat.com main server in the US, so it's going to be slow ;) You can either choose a [http://fedora.redhat.com [local mirror]] with a better performance and/or go to [http://freshrpms.net [frehsrpms.net]] and get the yum supplied by freshrpms. Besides beeing a very fast system, freshrpms has a lot of other goodies, so you might really want to try it if you don't already use it.</li> <li>'''New vserver enabled kernel''' The Fedora default Kernel is highly patched already and thus might not be compatible with the patches supplied by linux-vserver.org. For this reason, we are going to use a vanialla-kernel (read: an unmodified original linux kernel) from kernel.org. If you do require a patch supplied by redhat/fedora this howto doesn't work for you, please check the contact page for ways to contact us, maybe someone can help you out. <ul> <li>Ftp to a local kernel.org mirror ( usually the url ftp://ftp.%3Ccountry-code%3E.kernel.org should work, e.g. ftp.de.kernel.org for germany)</li> <li>Go to ''/pub/linux/kernel/v2.4/''</li> <li>Get the latest ''linux-2.4.??.tar.bz2'' ( where ?? is the kernel subversion, by the time of this writing, the latest is 28)</li> <li>Get the matching .sign file</li></ul> Once both files are downloaded, verify the pgp signature of the archive: <ul> <li>Add the linux kernel [[OpenPGP]] signature to your local gpg by running ''gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E''</li> <li>Now verify the kernel: ''gpg --verify linux-2.4.??.tar.bz2.sign linux-2.4.??.tar.bz2'' ( for more details about this, visit [http://www.kernel.org/signature.html [Kernel.org]])</li></ul> move the kernel archive to /usr/src (''mv linux-2.4.??.tar.bz2 /usr/src/'') and unpack it (''tar -xjf linux-2.4.??.tar.bz2'') The vanilla kernel is ready, let's get the patch: <ul> <li>Donwload [http://www.13thfloor.at/vserver/s_release/v1.29/linux-vserver-1.29.tar.bz2 [the Patchset]] now ( by the time of this writing, the latest stable version is 1.29)</li> <li>Extract it in ''/usr/src'' and run patch ( ''patch -p0 < patch-2.4.??-vs1.29.diff'' ) from within /usr/src</li> <li>Now enter the linux-2.4.?? source directory and run ''make menuconfig''. You need to make sure all the reliquired vserver options are enabled, besides that, build a kernel as usual. ( on help how to build a custom kernel, please google ;) )</li></ul> </li> <li>'''Using the vserver kernel''' Before you can make use of the kernel, we need to do some minor modifications to the /etc/fstab and the lilo.conf/grub.conf. Redhat/Fedora uses LABEL for partitions, which is good idea but requires a kernel patch we don't have. For our kernel to work, the real device needs to be defined, thus the fstab needs to be changed. Depending on your setup, this can be only / or some more. To find out, which partitions is what, do a simple ''mount'' to get a list of mounted devices and compare them with the labled locations in the /etc/fstab. For example if / is mounted on /dev/hda1, you'll have to modify LABEL=/ to be /dev/hda1. Do the same for the kernel options (root=...) in lilo.conf or grub.conf, depending on your bootloader. Do ''not'' use the vserver only. Keep a working backup-kernel ready so you know you can reboot to a working system neverthe less. ''Reboot'' :) If you didn't break your kernel setup and i didn't loose you on the way to this line, you should have a vserver enabled kernel ready by now.</li> <li>'''Vserver utils''' A vserver enabled kernel might be nice, but its pretty pointless unless you have some tools to make use of its functionality. <ul> <li>Download [http://www.13thfloor.at/vserver/s_release/v1.29/util-vserver-0.30.tar.bz2 [util-vserver]](v0.30)</li> <li>Run rpmbuild on it (''rpmbuild -tb util-vserver-0.30.tar.bz2'') (if you don't have rpmbuild installed do ''yum install rpm-build'')</li> <li>Install the compiled package (''rpm -ihv /usr/src/redhat/RPMS/i386/util-vserver-0.30-0.i386.rpm'')</li> <li>In case you want to use the linuxconf tui version, install the 2nd package, too - we won't need it for this howto</li></ul> </li> <li>'''Getting Fedora Support into Vserver utils''' <ul> <li>To install a vserver you now need the first Fedora Core 1 CD again mounted to /mnt/cdrom (you can mount the iso, too)</li></ul> </li></ol> <span id="c.-vserver-creation"></span> == C. VServer creation == <ol> <li>'''Build a new vserver''' The first step is to build a basic new server. Using the install-script from the util-vserver package, you can create a very basic server (using the minimum filelist) or a full install of CD 1: <ul> <li>A minimum vserver named "test": ''cd /usr/lib/util-vserver && ./install-fc1 test minimum''</li> <li>A full CD1 install vserver: ''cd /usr/lib/util-vserver && ./install-fc1 test''</li></ul> The installer script will create a new vserver with the give name in /vservers and the appropiate config and startup files in /etc/vservers <ul> <li>For the vserver to work standalone with a real ip, you need to modify the <servername>.conf file in /etc/vservers to suit your needs</li> <li>If you want your vserver to come up at boot time, set ONBOOT=yes ( you need to enable the vservers service on your host for that to work, too! - run ''ntsysv'' to enable it)</li> <li>Disable all unwanted services on the hostserver while you're at it. We don't need xinetd or sendmail in daemon mode...</li></ul> </li> <li>'''Enter the new vserver''' Once the vserver has been created, you can use it. Usually you want at least syslog and cron to run, so we need to configure that. <ul> <li>Enter the vserver (''vserver test enter'') and run ''ntsysv'' again - now in the vserver - to select the services (at least syslog and cron a recommended)</li> <li>Leave the vserver and try to run in standalone: ''vserver test start''</li> <li>You should see the usual booting messages of starting services along with some vserver specific notes</li> <li>To verify that your vserver is up and running, you can call ''vserver-stat''</li></ul> </li></ol> <span id="d.-vserver-updates"></span> == D. VServer updates == Since the vserver creation has been run from the original CD, the installed packages are pretty much out of date and should be updated as we already did for the host server. To avoid downloading all the packages again and again, we're going to run yum from the host to update the vserver with a special parameter: * ''yum --installroot=/vservers/test update'' This will run the update process based on the rpm-database within the vserver while using the packages already downloaded for the host as source. <span id="congratulations---youre-done"></span> == Congratulations - You're done ;) == </div> <div id="footer"> <div class="copyleft"> <br /> Permission is granted to copy, distribute and/or modify this document under the terms of the<br /> [http://www.fsf.org/licenses/fdl.txt GNU Free Documentation License], Version 1.2 or any later version published by the Free Software Foundation. </div> ----- <div id="toolbar-bottom"> [[FedoraHowTo?action=edit|Edit this document]] | [[FedoraHowTo?action=history|View document history]]<br /> </div> Document last modified Fri, 14 Jan 2005 08:03:43<br /> <div class="form"> <br /> Search: </div> </div>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information