Installing A Multiserver Setup With Dedicated Web, Email, DNS And MySQL Database Servers On Debian 5.0 With ISPConfig 3 - Page 3

5 Installing The Primary DNS Server

Edit the hosts file and add the IP addresses and hostnames for all servers. The hostnames and IP addresses have to be adjusted to match your setup.

vi /etc/hosts

127.0.0.1       localhost
192.168.0.105   web.example.tld
192.168.0.106   mail.example.tld
192.168.0.107   db.example.tld
192.168.0.108   ns1.example.tld
192.168.0.109   ns2.example.tld
 
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Set the hostname of the server:

echo ns1.example.tld > /etc/hostname
/etc/init.d/hostname.sh start

Edit the sources.list file...

vi /etc/apt/sources.list

... and ensure that it contains the following line to enable the volatile repository.

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

Run...

apt-get update

... to update the apt package database; then run...

apt-get upgrade

... to install the latest updates (if there are any).

It is a good idea to synchronize the system clock with an NTP (network time protocol) server over the Internet. Simply run...

apt-get -y install ntp ntpdate

... and your system time will always be in sync.

Install MySQL client and server:

apt-get -y install mysql-client mysql-server

Enter the new password for MySQL when requested by the installer.

Then install install the commandline version of PHP to be able to run PHP-based shell scripts for ISPConfig:

apt-get -y install php5-cli php5-mysql php5-mcrypt mcrypt

Install BIND DNS Server:

apt-get -y install bind9 dnsutils

Next install ISPConfig 3 on the dns server. To get the download URL of the latest ISPConfig 3 stable release, please visit the ISPConfig website: http://www.ispconfig.org/ispconfig-3/download/

Download the latest ISPConfig 3 stable release:

cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/

Then start the install script:

php -q install.php

Select language (en,de) [en]: <-- en
Installation mode (standard,expert) [standard]: <-- expert
Full qualified hostname (FQDN) of the server, eg server2.domain.tld [ns1.example.tld]: <-- ns1.example.tld
MySQL server hostname [localhost]: <-- localhost
MySQL root username [root]: <-- root
MySQL root password []: <-- Enter your MySQL root password here
MySQL database to create [dbispconfig]: <-- dbispconfig
MySQL charset [utf8]: <-- utf8
Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: <-- y
MySQL master server hostname []: <-- web.example.tld
MySQL master server root username [root]: <-- root
MySQL master server root password []: <-- Enter the root password of the master server here
MySQL master server database name [dbispconfig]: <-- dbispconfig
Configure Mail (y,n) [y]: <-- n
Configure Jailkit (y,n) [y]: <-- n
Configure FTP Server (y,n) [y]: <-- n
Configure DNS Server (y,n) [y]: <-- y
Configure Apache Server (y,n) [y]: <-- n
Configure Firewall Server (y,n) [y]: <--y
Install ISPConfig Web-Interface (y,n) [y]: <--n

Run...

rm -f /var/www/ispconfig

... to remove the ISPConfig interface link in the /var/www directory.

Clean up the install directories:

rm -rf /tmp/ispconfig3_install/install
rm -f /tmp/ISPConfig-3-stable.tar.gz

 

6 Installing The Secondary DNS Server

Edit the hosts file and add the IP addresses and hostnames for all servers. The hostnames and IP addresses have to be adjusted to match your setup.

vi /etc/hosts

127.0.0.1       localhost
192.168.0.105   web.example.tld
192.168.0.106   mail.example.tld
192.168.0.107   db.example.tld
192.168.0.108   ns1.example.tld
192.168.0.109   ns2.example.tld
 
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Set the hostname of the server:

echo ns2.example.tld > /etc/hostname
/etc/init.d/hostname.sh start

Edit the sources.list file...

vi /etc/apt/sources.list

... and ensure that it contains the following line to enable the volatile repository.

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

Run...

apt-get update

... to update the apt package database; then run...

apt-get upgrade

... to install the latest updates (if there are any).

It is a good idea to synchronize the system clock with an NTP (network time protocol) server over the Internet. Simply run...

apt-get -y install ntp ntpdate

... and your system time will always be in sync.

Install MySQL client and server:

apt-get -y install mysql-client mysql-server

Enter the new password for MySQL when requested by the installer.

Then install install the commandline version of PHP to be able to run PHP-based shell scripts for ISPConfig:

apt-get -y install php5-cli php5-mysql php5-mcrypt mcrypt

Install BIND DNS Server:

apt-get -y install bind9 dnsutils

Next install ISPConfig 3 on the dns server. To get the download URL of the latest ISPConfig 3 stable release, please visit the ISPConfig website: http://www.ispconfig.org/ispconfig-3/download/

Download the latest ISPConfig 3 stable release:

cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/

Then start the install script:

php -q install.php

Select language (en,de) [en]: <-- en
Installation mode (standard,expert) [standard]: <-- expert
Full qualified hostname (FQDN) of the server, eg server2.domain.tld [ns2.example.tld]: <-- ns2.example.tld
MySQL server hostname [localhost]: <-- localhost
MySQL root username [root]: <-- root
MySQL root password []: <-- Enter your MySQL root password here
MySQL database to create [dbispconfig]: <-- dbispconfig
MySQL charset [utf8]: <-- utf8
Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: <-- y
MySQL master server hostname []: <-- web.example.tld
MySQL master server root username [root]: <-- root
MySQL master server root password []: <-- Enter the root password of the master server here
MySQL master server database name [dbispconfig]: <-- dbispconfig
Configure Mail (y,n) [y]: <-- n
Configure Jailkit (y,n) [y]: <-- n
Configure FTP Server (y,n) [y]: <-- n
Configure DNS Server (y,n) [y]: <-- y
Configure Apache Server (y,n) [y]: <-- n
Configure Firewall Server (y,n) [y]: <--y
Install ISPConfig Web-Interface (y,n) [y]: <--n

Run...

rm -f /var/www/ispconfig

... to remove the ISPConfig interface link in the /var/www directory.

Clean up the install directories:

rm -rf /tmp/ispconfig3_install/install
rm -f /tmp/ISPConfig-3-stable.tar.gz

 

7 Adjust The Server Settings In ISPConfig

Log into ISPConfig on the master server with a web browser:

http://192.168.0.105:8080

Click on System > Server services > web.example.tld and disable all checkboxes except of the Webserver and Fileserver checkbox and click on Save.

Click on System > Server services > mail.example.tld and disable all checkboxes except of the Mailserver checkbox and click on Save.

Click on System > Server services > db.example.tld and disable all checkboxes except of the DB-Server checkbox and click on Save.

Click on System > Server services > ns1.example.tld and disable all checkboxes except of the DNS-Server checkbox and click on Save.

Click on System > Server services > ns2.example.tld and disable all checkboxes except of the DNS-Server checkbox and select ns1.example.com in the Is mirror of Server selectbox and click on Save.

 

8 Links

Share this page:

12 Comment(s)

Add comment

Comments

From: at: 2010-08-20 13:41:30

When I use  http://192.168.0.105/phpmyadmin (my server is located at a different address) i get a broken link message. Is there a step missing?

From: at: 2010-08-21 13:12:18

Replace 192.168.0.105 with the IP address of your master server.

From: s2fit at: 2011-08-24 01:35:28

when I add a DB for a client, I can't connect to it. and when I try the phpmyadmin link next to the DB in the CP it doesn't load

From: Jons web based ftp at: 2010-08-29 17:50:43

Great tutorial, the only part I adapted was adding a handler for RAR files instead of TAR.

From: at: 2010-09-27 23:49:55

Will this work for Ubuntu? If so what needs to be done differently? I can't find any other tutorial out there...

From: at: 2011-10-06 17:45:40

This should work for Ubuntu too.

From: Thomas at: 2010-09-07 13:52:28

Can this work on ubuntu?

From: at: 2010-11-24 12:04:32

Hello

Is it possible to integrate RoundCoube/Squrrielmail on these servers ? If yes, can I use this guide: http://www.howtoforge.com/roundcube_webmail_ispconfig ??

I have made this setup, but I can´t find the RoundCube under ISPConfig -> System -> Apps & Addons -> Packages. How can I install it ? I want to use www.domain.tld/webmail with ssl on port 443.

 

Please help.

Best regards
WolfieDK

From: Pilgrim at: 2011-07-26 06:51:23

There is a issue with a apache2-mpm-prefork module on application server and sites applications with smarty, sessions and other functions what are need to write data somewhere to the web directory.

ISPConfig create a virtual hosts with 

# add support for apache mpm_itk
<IfModule mpm_itk_module>
 AssignUserId web1 client1
</IfModule>

by default vhost template.

So you need to uninstall apache2-mpm-prefork and install apache2-mpm-itk module to solve this issue.

From: at: 2011-10-06 17:36:33

It is not nescessary to install apache2-mpm-itk to solve that. apache2-mpm-prefork works absolutely fine, you just missed to enable the suexec checkbox in the website settings in ispconfig so that the scripts run under the user of the website.

From: Anonymous at: 2011-08-21 19:01:55

Thanks for great How to. I wanna ask: Should I apply some startup priority or it doesnt matters which server starts first? And do i need static IP adress for all servers or just for WEB and it will comunicate with other servers via LAN? thx for answer

From: Jeff at: 2013-03-03 11:09:35

I think one also would want quota-management on the mail server, or are mailquotas managed by postfix/dovecot itself?