HowtoForge - Linux Howtos in English English|HowtoForge.de - Linux-Howtos auf Deutsch Deutsch

The Perfect Setup - Fedora Core 4

Submitted by falko (Contact Author) (Forums) on Mon, 2005-07-18 14:44. :: Fedora

This is a "copy & paste" HowTo! The easiest way to follow this tutorial is to use a command line client/SSH client (like PuTTY for Windows) and simply copy and paste the commands (except where you have to provide own information like IP addresses, hostnames, passwords,...). This helps to avoid typos.

The Perfect Setup - Fedora Core 4

Version 1.3
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited: 01/03/2006

This is a detailed description about the steps to be taken to setup a Fedora Core 4 based server that offers all services needed by ISPs and hosters (web server (SSL-capable), mail server (with SMTP-AUTH and TLS!), DNS server, FTP server, MySQL server, POP3/IMAP, Quota, Firewall, etc.). In addition to that I will show how to use Debian's package manager apt on an rpm-based system because it takes care of package dependencies automagically which can save a lot of trouble.

I will use the following software:

  • Web Server: Apache 2.0.x
  • Mail Server: Postfix (easier to configure than sendmail; has a shorter history of security holes than sendmail)
  • DNS Server: BIND9
  • FTP Server: proftpd
  • POP3/IMAP servers
  • Webalizer for web site statistics

In the end you should have a system that works reliably and is ready for the free webhosting control panel ISPConfig (i.e., ISPConfig runs on it out of the box).

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

Requirements

To install such a system you will need the following:

1 The Base System

Boot from your Fedora Core 4 CD (CD 1) or DVD.

It can take a long time to test the installation media so we skip this test here:

The welcome screen of the Fedora installer appears:

Choose your language next:

Select your keyboard layout:

We want to install a server so we choose Server here:

Now we have to partition our hard disk. You can choose to let the Fedora installer do the partitioning, or you can do it yourself. I want to create a small /boot partition (less than 100 MB) with the file system ext3, a swap partition and a huge / partition (again with ext3):

Now the boot loader GRUB will be installed. You can leave the default settings unchanged and click on Next:


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Please do not use the comment function to ask for help! If you need help, please use our forum: http://www.howtoforge.com/forums
Comments will be published after administrator approval.
Submitted by Anonymous (Contact Author) (Forums) on Thu, 2006-01-19 11:11.
It is applicable to i386 (Intel) architecture, not the other way around (not ppc (Mac), not x86_64 (AMD) either).
Submitted by Anonymous (Contact Author) (Forums) on Fri, 2006-01-06 10:36.

Getting named to work was giving me bloody hell. Whenever I tried to start the service, it would fail. I went through the log and got a:

  • could not configure root hints from '/etc/db.cache': file not found

error message. Since I had no idea what chroot was doing nor what a 'prison' is, this error was making no sense to me. /etc/db.cache is a file and it exists! I'm sure of it.

Finally, I discovered that we are setting up named to run in a 'prison', which means it thinks the directory /var/named/chroot/etc/ is the root top directory. I got the problem fixed by copying db.cache to the prison, like so:

  • cp -f /etc/db.cache /var/named/chroot/etc/
If only I knew what was going on I could have saved an hour of my life :(

Submitted by Anonymous (Contact Author) (Forums) on Wed, 2005-12-21 19:28.
Why do you suggest to create a virtual NIC eth0:0 when eth0 already exists? What is the purpose of this extra NIC?
Submitted by Anonymous (Contact Author) (Forums) on Mon, 2006-01-09 06:17.

Most companies who sell Fully-Qualified Domain Names will require the subscriber to have at least two public IP addresses, which are assigned by an ISP, for a Primary and Secondary Domain Name System. Ideally, these would be on (at least) two seperate computers with two seperate accounts with seperate power supplies to decrease the chance of the domain name being down entirely.

Most DIY'ers don't have two computers to do this with, or two different ISP accounts. Since both IP addresses (primary and secondary) will be coming into the same cable into the same NIC, then the computer has to be told to listen for both IP addresses on the same NIC (ie. MAC address), thus a virtual NIC.

If you have two different ISP accounts coming into two different NIC's, then this is not needed, you would assign the NICs as normal (eth0 and eth1, for example).

Submitted by Anonymous (Contact Author) (Forums) on Wed, 2005-10-12 20:00.
Someone is submited problem
Submitted by Anonymous on Sat, 2005-08-06 17:14.
When I get to the command "quotacheck -avugm" I get a command not found error. I have been through the instructions twice and have followed them exactly each time but it has happened twice. I have installed everything as instructed. Any suggestions?
And hi REPLAY
Submitted by Anonymous on Sat, 2005-08-06 17:18.
I got it, had to be logged in as root
BUT I HAVE that problem and it is not logged problem
And Second problem is in
"E: coulden't find package imap..."
But I runed
apt-get update
End got
E:Some index files failed to download, they have been ignored, or old ones used instead.
What is going on here :))
Submitted by admin (Contact Author) (Forums) on Thu, 2005-10-13 08:58.
About your imap problem: I've just added a short explanation on http://howtoforge.com/perfect_setup_fedora_core_4_p3, just below the part where I describe which repositories should be used in /etc/apt/sources.list. Read this closely, and you'll understand your problem.
Submitted by Anonymous (Contact Author) (Forums) on Mon, 2005-10-03 23:00.

I'm thinking maybe that PostFix is configured wrong, but I'm not sure how to debug. Some of my webpages make use of the mail() function. Which has worked on other hosts...but under my ISPConfig host (which is being hosted and setup using the Perfect Setup for FC4), I get the follow in root's mail:

----- The following addresses had permanent fatal errors -----
dave@network.net
(reason: 550 <dave@network.net>: Recipient address rejected: User unknown in local recipient table)
(expanded from: dave@network.net)

----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 <dave@network.net>: Recipient address rejected: User unknown in local recipient table
550 5.1.1 dave@network.net... User unknown
<<< 554 Error: no valid recipients

I double checked /etc/alternatives and found that mta --> /usr/sbin/sendmail.sendmail

changed to mta --> /usr/sbin/sendmail.postfix

and my error message (in roots mail) changed to:

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

The Postfix program

<dave@network.net>: unknown user: "dave"

so I double-checked /etc/postfix/local-host-names and found:

localhost
....etc...
network.net
## MAKE MANUAL ENTRIES BELOW.....

but my setup in ISPConfig for that site shows that I'm using an external mailserver (and how would the mail() from PHP care about that?!)...and I have the MX record setup in DNS to point to the 'real' mail server. I know DNS is setup properly, as mail to this address/site from any other client works/goes through...just can't use the mail() function properly?!

Any help, always appreciated - as I have a bruised forehead from banging!?

-dave-

Submitted by Anonymous (Contact Author) (Forums) on Wed, 2005-11-02 23:58.
Just a quick answer: The problem is not with your MTA (Postfix) or any other steps outlined in this HowTo but most probably with FC4's implementation of SELinux which disallows your webserver (Apache?) to use the Postfix sendmail binary (for security reasons). This is a common problem with PHP's mail() function, Apache and SELinux. Perhaps this could help: http://fedora.redhat.com/docs/selinux-apache-fc3/
Submitted by admin (Contact Author) (Forums) on Tue, 2005-10-04 09:08.
Can you post this in the forums, please? This problem is too complex to be handled in the comments section.
Submitted by Anonymous (Contact Author) (Forums) on Sat, 2005-10-01 02:36.

What directory do I need to be in for this symlink:

ln -s ../../ chroot

Thanks for the killer article!

1
next page
last page