The Perfect Setup - Fedora Core 4 - Page 3

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Mon, 2005-07-18 14:44. ::

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 4 (you will love it... :-)). In this tutorial I will use a mixture of Fedora's yum and apt, because not all yum packages are available for apt and vice versa.

yum install apt

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

rpm http://ayo.freshrpms.net fedora/linux/4/i386 core updates freshrpms
rpm http://ayo.freshrpms.net fedora/linux/4/i386 tupdates
rpm http://ayo.freshrpms.net fedora/linux/1/i386 core updates freshrpms

In the last line, rpm http://ayo.freshrpms.net fedora/linux/1/i386 core updates freshrpms, the 1 is not an error or typo! This is the repository that has the imap package which we are going to install soon! So do not change these lines!

Run

apt-get update

Import The GPG Keys For Software Packages

rpm --import /usr/share/rhn/RPM-GPG-KEY*

Install Some Software

yum install fetchmail wget bzip2 unzip zip nmap openssl lynx fileutils ncftp


Quota

yum 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
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder 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

yum 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/.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Fri, 2006-06-09 15:11.

The URL for apt has changed to a new version, so the command to install it should be

rpm -ivh http://ftp.freshrpms.net/pub/fedora/linux/extras/4/i386/apt-0.5.15lorg3.1-5.fc4.i386.rpm

Submitted by Anonymous (not registered) on Tue, 2006-01-31 06:15.
ok, some people have had some problems with there cfg fstab ( not being able to boot! ):
when you get to the point when it wants you to rescue/fix the problem in the read-only mode, type:
mount / -o remount,rw
this will gain you full write access to the "/"/root partition/dir.
copy fstab to a floppy:
mount -t vfat /dev/floppy /media/floppy/
cp /etc/fstab /media/floppy/fstab
umount /media/floppy/
this should get you the fstab on a floppy, to cfg on another pc. try to repeace your old settings ( get rid of the ",usrquota,grpquota" )
next, mount the floppy again ( after you've modded the fstab [ from the floppy ] on another pc! ), and overwrite it to the /etc dir:
mount -t vfat /dev/floppy /media/floppy/
cp /media/floppy/fstab /etc/fstab

THE END -and the allies win!
Submitted by Anonymous (not registered) on Sat, 2006-08-26 03:28.

<quote> mount / -o remount,rw
this will gain you full write access to the "/"/root partition/dir.</quote>

After this command, simply type in:

vi /etc/fstab

fstab will open up in vi (vim?)  Press the letter i to get into "insert" mode (edit mode).  Go the the beginning of the line you added, which starts LABEL=/ and place a hash mark # in front of that line.  Hit ESCAPE key and type the following:

:wq 

This will save the changes to the fstab file.  The hash mark tells the system to ignore the line directly after it. 

Ctrl+D reboots, and your system should start back up.

 

Cheers,

Robert Reese~ 

Submitted by Anonymous (not registered) on Wed, 2005-11-30 19:42.

With your setup, apt-get would give me the following error:

E: Unknown signature /var/cache/apt/archives/ blah blah
E: Error(s) while checking package signatures:

it has been corrected with the following commands:

wget http://svn.rpmforge.net/svn/branches/rpms/matthias/apt/RPM-GPG-KEY.freshrpms
rpm --import RPM-GPG-KEY.freshrpms

Hoping this helps

Submitted by Anonymous (not registered) on Thu, 2005-11-10 17:22.

I'm getting, "Permission Denied" when trying to access this file: /etc/sysconfig/network-scripts/ifcfg-eth0

I'm loging in as root. Do I need to create another login or change permissions?

Submitted by Anonymous (not registered) on Thu, 2006-05-04 19:52.

you gett permision denied becouse you dont use any editor text such mcedit pico,nano

try again ,login as root than :

mcedit /etc/sysconfig/network-scripts/ifcfg-etho

Submitted by Anonymous (not registered) on Sat, 2005-10-29 22:03.

Maybe its a good idea to add the '-y' flag to the yum command?

ie : yum -y install bind-chroot

I am quite lazy and most often i just copy/ paste to putty ;-)

Great howto by the way!

Submitted by Anonymous (not registered) on Thu, 2005-10-27 16:55.

Killer howto,

One problem - my system won't boot now. I get the following error on boot up

fschk.ext3: Unable to resolve 'LABEL=/'

enter password for maintenance for CTRL D to reboot. So i thought i would delete that line to start with and make sure the system could boot but i can't edit the file now. !!!!!! HELP!!!!

Submitted by Anonymous (not registered) on Tue, 2006-01-31 05:40.

I'm having the same problem :(

I can see the /etc/fstab, copy it to a floppy and edit it, but the filesystem is read-only!!! When I try to use "linux rescue" from the install disk, it can't read all the file system, or wants me to use read-only.

I've finished all of the other instructions, and thats alot of stuff I dont want to be bothered to download again, mevermined installing on such a shitty mechine...

-Anyway I can get out of being fucked?
Submitted by admin (registered user) on Thu, 2005-10-27 17:28.

Please use the forums if you need help with the howtos.

http://www.howtoforge.com/forums

The comment function below the howtos is intended only for comments, not for support.

Submitted by Anonymous (not registered) on Sat, 2005-10-01 01:55.

What directory do I need to be in when making this symlink?

Probably /root? - maybe not... please help

Thanks for the killer How-To - very well written

P

Submitted by admin (registered user) on Sat, 2005-10-01 16:03.
In /var/named/chroot/var/named/, as the line before says:

cd /var/named/chroot/var/named/