Current time: 08-11-2022, 10:01 AM Hello There, Guest! (LoginRegister)


Post Reply 
NFS advice
Author Message
ProServ-UK Offline
Junior Member
*

Posts: 32
Joined: Aug 2007
Reputation: 0
Post: #11
RE: NFS advice
awsome news, and hey who doesnt need a beer after a weeks work ? lol cya soon mate
08-25-2007 10:02 AM
Visit this user's website Find all posts by this user Quote this message in a reply
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
ProServ-UK Offline
Junior Member
*

Posts: 32
Joined: Aug 2007
Reputation: 0
Post: #13
RE: NFS advice
very nicely done and i will be testing this out very soon i will be leaving feedback and all praises for this document go to you Big Grin nice work thanks for sharing
08-26-2007 02:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ProServ-UK Offline
Junior Member
*

Posts: 32
Joined: Aug 2007
Reputation: 0
Post: #14
RE: NFS advice
you know how you said you used vmware, you think it would work just aswell on two actual seperate servers ?
08-26-2007 02:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #15
RE: NFS advice
ProServ-UK Wrote:you know how you said you used vmware, you think it would work just aswell on two actual seperate servers ?
It should do, but I get the feeling I may have missed something from the instructions. Will check them over in a bit.
08-26-2007 03:03 AM
Find all posts by this user Quote this message in a reply
ProServ-UK Offline
Junior Member
*

Posts: 32
Joined: Aug 2007
Reputation: 0
Post: #16
RE: NFS advice
ok kool mate not a problem, well you do the rough write up and ill clean it up and put it in the wiki if you like,
but just incase anyone is going to try this before i have tested it be aware it may not work as it is a rough how to as of yet Smile
08-26-2007 03:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #17
RE: NFS advice
Right added the bits I missed (Squirrel Mail stuff lol)

Re-tested using RC2C and works fine, will re-test using latest trunk
08-26-2007 06:04 AM
Find all posts by this user Quote this message in a reply
ProServ-UK Offline
Junior Member
*

Posts: 32
Joined: Aug 2007
Reputation: 0
Post: #18
RE: NFS advice
ok awsome im just setting it up now had to wait for my little girl to go home as she is the main thing in my weekend so wanted to wait ill let you know what out come i have lol
08-26-2007 06:10 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #19
RE: NFS advice
If your doing this with the latest trunk and find you can't add users it is not my fault.

Bug ticket launched http://www.isp-control.net/ispcp/ticket/605

Cant add users on latest trunk, even on a single server setup

EDIT : Happens if you try to install AWStats, about to re-test the multiserver setup with latest trunk
(This post was last modified: 08-26-2007 08:09 PM by rsmithgs.)
08-26-2007 09:59 AM
Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #20
RE: NFS advice
rsmithgs Wrote:If your doing this with the latest trunk and find you can't add users it is not my fault.

Bug ticket launched http://www.isp-control.net/ispcp/ticket/605

Cant add users on latest trunk, even on a single server setup

EDIT : Happens if you try to install AWStats, about to re-test the multiserver setup with latest trunk

Yep latest trunk with the above procedure works fine if you dont install awstats Smile

Now will see if it is possible to add another web and database server to the setup.

Me and Rick spotted a potential issue this morning, the email server traffic will not be counted towards the users traffic allowance though ISPCP should count the amount of storage email takes up and count that towards a users storage allowance.
08-26-2007 10:44 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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