Current time: 04-26-2024, 06:20 PM Hello There, Guest! (LoginRegister)


Post Reply 
NFS advice
Author Message
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #12
RE: NFS advice
Here is something I knocked up quickly.

Installing separate Web and Email server with ISPCP Control Panel.

Firstly I have built 2 identical servers in VMWare, all have 512MB RAM, 40GB Harddisks and have a fresh install of Debian Etch from the Netinst CD. The servers have an internet connection during the build.

The partitions are set up as follows though you can alter these to suit:

100MB - /boot
2GB - /
768MB – SWAP
768MB – SWAP
2GB - /tmp
1GB - /var/log
Remainder - /var

At package selection I de-selected all options.

The servers are called:

web.testdom.co.uk
email.testdom.co.uk

Web has the IP address of 192.168.1.1
Email has the IP address of 192.168.1.2

As this is a test run, this guide is a “quick and dirty” way to test the concept. Please feel free to offer feedback or edit this document.

Once all servers have Debian installed, login as root and type:
apt-get install ssh

This will allow us to ssh into the servers and this will allow an easier install. (i.e. you can copy and paste).

Once ssh is installed, exit and ssh into the 3 servers.

Add the following lines to /etc/apt/sources on all 3 servers.
deb http://ftp.de.debian.org/debian/ stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
Run the following on all 3 servers.

apt-get update && apt-get upgrade
(If the kernel updates be sure to reboot before continuing).

Run the following on the web server:

apt-get install apache2 apache2-mpm-worker apache2.2-common apache2-utils bind9 bzip2 diff dnsutils gcc gzip iptables libapache2-mod-fastcgi libberkeleydb-perl libc6-dev libcrypt-blowfish-perl libcrypt-cbc-perl libcrypt-passwdmd5-perl libdate-calc-perl libdate-manip-perl libdbd-mysql-perl libdbi-perl libio-stringy-perl libmail-sendmail-perl libmailtools-perl libmcrypt4 libmd5-perl libmime-perl libnet-dns-perl libnet-netmask-perl libnet-perl libnet-smtp-server-perl libperl5.8 libsasl2 libsasl2-modules libsnmp-session-perl libterm-readkey-perl libterm-readpassword-perl libtimedate-perl libmysqlclient15off make mysql-client original-awk patch perl perl-base perl-modules php4 php4-cgi php4-gd php4-mcrypt php4-mysql php4-pear php5-cgi php5-gd php5-imap php5-mcrypt php5-mhash php5-mysql proftpd-mysql rkhunter sasl2-bin ssh tar wget bash libnet-libidn-perl nfs-common postfix courier-base rkhunter mysql-common mysql-server

Run the following on the mail server:

apt-get install bind9 bzip2 courier-authdaemon courier-base courier-imap courier-maildrop courier-pop diff dnsutils gcc postgrey gzip iptables libberkeleydb-perl libc6-dev libcrypt-blowfish-perl libcrypt-cbc-perl libcrypt-passwdmd5-perl libdate-calc-perl libdate-manip-perl libdbd-mysql-perl libdbi-perl libio-stringy-perl libmail-sendmail-perl libmailtools-perl libmcrypt4 libmd5-perl libmime-perl libnet-dns-perl libnet-netmask-perl libnet-perl libnet-smtp-server-perl libperl5.8 libsasl2 libsasl2-modules libsnmp-session-perl libterm-readkey-perl libterm-readpassword-perl libtimedate-perl libmysqlclient15off make original-awk patch perl perl-base perl-modules postfix postfix-tls postgrey procmail rkhunter sasl2-bin ssh tar wget bash libnet-libidn-perl nfs-common nfs-kernel-server

Firstly we focus on the Mail Server

Edit /etc/exports

Add lines:
/etc/courier 192.168.1.1(rw,no_root_squash)
/etc/postfix 192.168.1.1(rw,no_root_squash)
/var/mail 192.168.1.1(rw,no_root_squash)

Edit /etc/hosts.allow

Add lines:
portmap: 192.168.1.1
lockd: 192.168.1.1
rquotad: 192.168.1.1
mountd: 192.168.1.1
statd: 192.168.1.1

Edit /etc/hosts.deny

Add lines:

portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

Run:

/etc/init.d/portmap restart
/etc/init.d/nfs-common restart
/etc/init.d/nfs-kernel-server restart

(Expect some errors in ref to subtree_check)

Now we focus on the web server

edit /etc/fstab

Add lines:

192.168.1.2:/var/mail /var/mail nfs rw 0 0
192.168.1.2:/etc/courier /etc/courier nfs rw 0 0
192.168.1.2:/etc/postfix /etc/postfix nfs rw 0 0

Run mount -a

Download ISPCP.

Enter the directory with the ISPCP files and

make install
cp -Rv /tmp/ispcp-1.0.0/* /
cd /var/www/ispcp/engine/setup
mysqladmin -u root password WHATEVERYOUWANTTHEPASSWORDTOBE
perl ispcp-setup

Enter the required details, note that when asked .

Now we need to reconfigure Squirrelmail

Edit file /var/www/ispcp/gui/tools/webmail/config/config.php

Locate line $smtpServerAddress = 'localhost';
Replace localhost with mail server ip

Locate line $imapServerAddress = 'localhost';
Replace localhost with mail server ip


Back on the mail server.

Edit /etc/postfix/main.cf

Change entries myhostname and mydomain to show email server name

run /etc/init.d/postfix restart

Job done.

When rebooting/powering on the servers, make sure the mail server comes up first before powering up the web server.

Reason for edit - I removed the mysql bits as it still doesnt work on a separate server.
(This post was last modified: 08-26-2007 09:57 AM by rsmithgs.)
08-26-2007 02:16 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
NFS advice - ProServ-UK - 08-21-2007, 06:55 AM
RE: NFS advice - ephigenie - 08-22-2007, 02:22 AM
RE: NFS advice - rsmithgs - 08-22-2007, 05:05 AM
RE: NFS advice - ProServ-UK - 08-22-2007, 05:59 AM
RE: NFS advice - rsmithgs - 08-22-2007, 04:17 PM
RE: NFS advice - BioALIEN - 08-22-2007, 09:38 PM
RE: NFS advice - rsmithgs - 08-22-2007, 09:44 PM
RE: NFS advice - ProServ-UK - 08-22-2007, 09:58 PM
RE: NFS advice - ProServ-UK - 08-25-2007, 02:02 AM
RE: NFS advice - rsmithgs - 08-25-2007, 07:14 AM
RE: NFS advice - ProServ-UK - 08-25-2007, 10:02 AM
RE: NFS advice - rsmithgs - 08-26-2007 02:16 AM
RE: NFS advice - ProServ-UK - 08-26-2007, 02:24 AM
RE: NFS advice - ProServ-UK - 08-26-2007, 02:32 AM
RE: NFS advice - rsmithgs - 08-26-2007, 03:03 AM
RE: NFS advice - ProServ-UK - 08-26-2007, 03:51 AM
RE: NFS advice - rsmithgs - 08-26-2007, 06:04 AM
RE: NFS advice - ProServ-UK - 08-26-2007, 06:10 AM
RE: NFS advice - rsmithgs - 08-26-2007, 09:59 AM
RE: NFS advice - rsmithgs - 08-26-2007, 10:44 PM
RE: NFS advice - rsmithgs - 08-27-2007, 01:40 AM
RE: NFS advice - rsmithgs - 09-05-2007, 08:53 PM
RE: NFS advice - BioALIEN - 09-05-2007, 09:20 PM
RE: NFS advice - rsmithgs - 09-05-2007, 10:16 PM
RE: NFS advice - BioALIEN - 09-06-2007, 02:24 AM
RE: NFS advice - rsmithgs - 09-06-2007, 02:29 AM
RE: NFS advice - BioALIEN - 09-06-2007, 03:06 AM
RE: NFS advice - rsmithgs - 09-06-2007, 04:18 AM
RE: NFS advice - BioALIEN - 09-06-2007, 07:58 PM
RE: NFS advice - rsmithgs - 09-06-2007, 08:11 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)