Editing
FedoraCore3 HowTo
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!
<div id="header"> <div class="logo"> [[Linux-VServer|[[File:http://wiki.linux-vserver.org/skins/common/images/wiki.png|[Home]]]]] </div> <span id="fedoracore3_howto"></span> = [[?action=find&find=FedoraCore3_HowTo|FedoraCore3_HowTo]] = <div id="toolbar-top"> [[Linux-VServer]] | [[RecentChanges]] | [http://oldwiki.linux-vserver.org/?action=prefs Preferences] | [http://tavi.sourceforge.net/FormattingRules FormattingRules] </div> ----- </div> <div id="body"> <div style="margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;"> <div class="floatleft"> <span> [[Image:Icon-Caution.png|[[File:http://wiki.linux-vserver.org/images/1/1f/Icon-Caution.png|57x52px]]]] </span> </div> '''We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the [http://wiki.linux-vserver.org/Wiki_Team Wiki Team] page for instructions how to help or browse through our new wiki at [http://wiki.linux-vserver.org wiki.linux-vserver.org] to find the information already migrated.''' </div> <span id="fedora-core-3-how-to"></span> = Fedora Core 3 How To = This howto is supposed to guide you through the process of installing a new box with fedora core 3, 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 Fedore Core 2. '''What about Fedora Core 1 and older Redhat Linux releases?''' This Howto only covers FC2/FC3 since they are based on Kernel 2.6.x. If you have a Fedora Core 1 box, feel free to use the [[FedoraHowTo]]. But be aware that Fc1 and older are already in "legacy"-mode regarding their support from redhat/fedora so updates to vital parts of the os might come either slow or don't show up in prebuild form at all. You've been warned. <span id="a.-requirements"></span> == A. Requirements == # '''What do I need to get started?''' #* The Fedora Core 3 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 (installing sshd might be a good idea anyway)</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 /vservers, so it might be a good idea to create a seperate partition for them ( make it big enough!! >8 GB for a full install per server )</li></ul> Besides these hints, do a normal install of Fedora Core 3 on your system.</li> <li>'''Fedora Core update''' Since Core 3 is out for quite some time now, many packages have been updated. The original fedora supplied tool for updating is yum. Since the vserver-tools use apt4rpm, we're going to use apt here too. To get a good apt and a fast repository, we're going to use the freshrpms.net version <ul> <li>download apt (latest release as of this wirting is [http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/3/apt/apt-0.5.15cnc6-1.1.fc3.fr.i386.rpm [apt-0.5.15cnc6-1.1]].</li> <li>install it using ''rpm -ihv apt-0.5.15cnc6-1.1.fc3.fr.i386.rpm''</li> <li>initialize the repository database and upgrade of the system: ''apt-get update && apt-get upgrade''</li></ul> </li> <li>'''New vserver enabled kernel''' The Fedora default Kernel release 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 vanilla-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, see http://rpm.hozac.com/fedora/dhozac/3/i386/vserver/ for vserver-patched Fedora kernels. <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.6/''</li> <li>Get the latest ''linux-2.6.??.?.tar.bz2'' ( where ?? is the kernel subversion, by the time of this writing, the latest is 11.7)</li> <li>Get the matching .sign file</li> <li>Once both files are downloaded, verify the pgp signature of the archive:</li></ul> Add the linux kernel OpenPGP[[OpenPGP?action=edit|?]] signature to your local gpg by running ''gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E'' Now verify the kernel: ''gpg --verify linux-2.6.??.?.tar.bz2.sign linux-2.6.??.?.tar.bz2'' ( for more details about this, visit [http://www.kernel.org/signature.html [Kernel.org]]) <ul> <li>Move the kernel archive to /usr/src (''mv linux-2.6.??.?.tar.bz2 /usr/src/'') and unpack it (''tar -xjf linux-2.6.??.?.tar.bz2'')</li> <li>Download [http://vserver.13thfloor.at/Experimental/patch-2.6.11.7-vs1.9.5.x.diff.bz2 [the Patchset]] now (by the time of this writing, the latest version is 1.9.5 against kernel 2.6.11.7)</li> <li>Extract the diff (''bzip2 -d patch-2.6.11.7-vs1.9.5.x.diff.bz2'')</li> <li>Run the patch against the kernel from within /usr/src ( ''patch -p0 < patch-2.6.??.?-vs1.9.5.x.diff'' )</li> <li>Now enter the linux-2.6.??.? source directory and run ''make menuconfig''. You need to make sure all the required 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 /boot/grub/grub.conf. Redhat/Fedora uses LABEL for partitions, which might be considered a nice idea but requires a kernel patch we don't have installed. 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 grub.conf. (/dev/VolGroup[[VolGroup?action=edit|?]] style entries are fine). Do ''not'' use the vserver-kernel only. Keep a working backup-kernel ready so you know you can reboot to a working system neverthe less.</li> <li>'''Disable SELinux''' As good as SELinux might be, it does conflict in quite a few ways with the vserver setup and will lead to a lot of problems if you don't know how to handle SELinux in all details. Since we don't need SELinux within a vserver anyway, we're going to disable it: Open /etc/selinux/config in an editor of your choice and change the key ''SELINUX'' to disabled (''SELINUX=disabled'')</li> <li>'''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/d_rel26/v1.9.5/util-vserver-0.30.205.tar.bz2 [util-vserver]](v0.30.205)</li> <li>Run rpmbuild on it (''rpmbuild --without xalan -tb util-vserver-0.30.205.tar.bz2'') (if you don't have rpmbuild installed do ''apt-get install rpm-build'')</li></ul> Sidenote: To avoid the dependency problem for xlana-j (dropped from FC3 release) we build using ''--without xalan'' here, all other dependencies should be fixable in case they occur. If you don't want to use dietlibc either, add a second ''--without dietlibc'' to the rpmbuild command (NB This isn't recommended!). <ul> <li>Install the compiled package (''rpm -ihv /usr/src/redhat/RPMS/i386/util-vserver-*0.30.205-0.i386.rpm'')</li></ul> </li> <li>'''Getting Fedora Core 3 Support into Vserver utils''' This version of the veserver utils uses - as mentioned earlier - apt to install the client os. Since as of today the utils don't know about fc3, we have to add it manually: <ul> <li>Copy the fc2 folder in /etc/vservers/.distributions to fc3 (''cp -R /etc/vservers/.distributions/fc2 /etc/vservers/.distributions/fc3'')</li> <li>Change all references to Core 2 to now point to 3 in the apt/sources.list using a text editor of your choice (e.g. /core/2/i386 becomes /core/3/i386)</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. The vserver-utils do have a very nice cli tool to do so with automatic use of latest packages available due to the incorporation of apt. To build a new server with the name "servername" and an IP adress of 1.2.3.4 based on [[FedoreCore]] 3 do: <ul> <li>''vserver servername build -m apt-rpm --hostname=servername.mydomain.tld --interface eth0:1.2.3.4/24 -- -d fc3''</li></ul> This will create all required configfiles and build the server in /vservers for you. Once installed and updated, you can ... <ul> <li>start it with ''vserver servername start''</li> <li>enter the newly created vserver, use ''vserver servername enter''</li></ul> </li></ol> <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"> [[FedoraCore3_HowTo?action=edit|Edit this document]] | [[FedoraCore3_HowTo?action=history|View document history]]<br /> </div> Document last modified Fri, 07 Oct 2005 16:28:27<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