The Perfect Setup - Fedora Core 3 - Page 3

2 Installing And Configuring The Rest Of The System

Configure Additional IP Addresses

Let's assume our network interface is eth0. Then there is a file /etc/sysconfig/network-scripts/ifcfg-eth0 which looks like this:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet

Now we want to create the virtual interface eth0:0 with the IP address 192.168.0.101. All we have to do is to create the file /etc/sysconfig/network-scripts/ifcfg-eth0:0 which looks like this:

DEVICE=eth0:0
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.101
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet

Afterwards we have to restart the network:

/etc/init.d/network restart

Setting The Hostname

echo server1.example.com > /etc/hostname
/bin/hostname -F /etc/hostname

Install apt For Fedora

apt is the packaging system used on Debian. Since it cares much better for package dependencies than rpm it would be nice if we could use it on our new Fedora system. This would save us a lot of hassle. Fortunately, apt has been ported to a lot of rpm based distributions, and is also available for Fedora Core 3 (you will love it... :-)).

rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/3/apt/apt-0.5.15cnc6-1.1.fc3.fr.i386.rpm

Edit /etc/apt/sources.list. It should contain the following lines:

rpm http://ayo.freshrpms.net fedora/linux/3/i386 core updates freshrpms
rpm http://ayo.freshrpms.net fedora/linux/3/i386 tupdates
rpm-src http://ayo.freshrpms.net fedora/linux/3/i386 core updates freshrpms
rpm-src http://ayo.freshrpms.net fedora/linux/3/i386 tupdates
rpm http://ayo.freshrpms.net fedora/linux/2/i386 core updates freshrpms
rpm http://ayo.freshrpms.net fedora/linux/1/i386 core updates freshrpms

In the last two lines, rpm http://ayo.freshrpms.net fedora/linux/2/i386 core updates freshrpms and rpm http://ayo.freshrpms.net fedora/linux/1/i386 core updates freshrpms, the numbers 2 and 1 are not errors or typos! These repositories have some packages which we are going to install soon! So do not change these lines!

Run

apt-get update

Install Some Software

apt-get install which fetchmail wget bzip2 unzip zip nmap openssl lynx fileutils ncftp


Quota

apt-get install quota

Edit /etc/fstab to look like this (I added ,usrquota,grpquota to LABEL=/ (mount point /):

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults,usrquota,grpquota 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/dev/hdc /media/cdrecorder auto pamconsole,ro,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0

Then run:

touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug


DNS-Server

apt-get install bind-chroot
chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
chkconfig --levels 235 named on
/etc/init.d/named start

Bind will run in a chroot jail under /var/named/chroot/var/named/.

Share this page:

4 Comment(s)

Add comment

Comments

From: at: 2005-08-22 13:42:36

Wonderful guides. I tried the setup guide for Debian. I have a Debian system running apache & ntp. Next step would've been dns then mail server. I previously tried setting up dns on Debian (sarge) myself, following the docs and file comments so I ended up with a chroot'd bind. Didn't work, so I gave up on it. Then ran into your wonderful guides, and tried again. Just the dns part. Kept running into a permission problem, when trying to start bind. I probably got the permissions or ownership wrong in the subdirectories that need to be created for chrooting bind, but with some googling, I also found notes related to the error message about permissions when attempting to start bind and some bug in Sarge/Debian.

The error message is something like, failed to start, and then something about a permission problem. Don't have the log anymore since Debian Sarge removes syslog files after a week, and I de-installed bind, planning to try reinstalling it at a later date after removing the subdirectories.

Keep the guides coming. If/when I get it all working, I'll be sending a token showing my appreciation.

One more thing: The server currently running apache, I plan on using that as the mail server (light) and one of two dns servers. The second dns server will be located on someone else's subnet. The apache server serves multiple sites via virtual names. What would you name the hostname of the server? ns1@somedomain.com would be out, because that would become the domain name for each virtual web site as well, right? To use something like ns1@somedomain, then it would be suggested to use a separate box for dns altogether? Or is this still feasible?

From: at: 2005-08-22 21:13:04

Have you tried checking the authors website for Debian Perfect Setup?

I have referenced it several times for the latest release, 3.1.

http://www.falkotimme.com/howtos/perfect_setup_debian_sarge/index.php

From: at: 2005-08-30 21:45:29

I havent used debian, though everyone i know who has always raves about apt-get. It doesnt seem to work as well on Fedora - i used yum to do what apt-get does (and also to keep my entire system up to date), but otherwise, a really awesome document...(well, the first half - which is where i am now.

From: Anonymous at: 2006-03-05 16:38:16

I have a dell poweredge SC 430, which has a hardware conflict with fedora 4 and I must run fedora 3, installed video card issue. I found I need to “apt-get update; apt-get upgrade??? and get a copy of newest zlib “wget http://www.zlib.net/zlib-1.2.3.tar.gz???
and install for httpd to function.