How to install ISPConfig 3 on Debian using automated script

In this article we will learn how to install ISPConfig 3 on Debian, which is by far one of the most free OpenSource hosting control panel for managing Linux hosting servers.
In this article we will use a particular procedure such as we will learn to install ISPConfig 3 on Debian using the ispconfig_setup script.

Safeguard Network Security for ISPconfig 3

VPS provided by Rackhansa provides protection for all ports including 8080, only the port 22, 80, 443 are opened by default. So your fresh installed ISPConfig 3 can not be accessed from the internet. Please read this post to find out how to securely access port 8080 and secure your ISPConfig instance.

Download and preparing for installation

Before we proceed with the download, we will update and upgrade the distro and then download the compressed installation script and uncompress it.

 apt-get update && apt-get upgrade
apt-get install unzip 
cd /tmp
wget https://github.com/servisys/ispconfig_setup/archive/master.zip
unzip master.zip 

In the above procedure we changed the directory to /tmp/ and then download the script over there and later we’ll uncompress it.

Installation of ISPConfig 3

After successfully downloading and uncompressing the script, we will now move to the procedure of installing it. This script will ask you to install either the standard mode or expert mode, and we will choose the standard mode.
The two modes are similar, the main difference is that in standard mode the ISPConfig installation is completely unattended, with the expert mode you can configure your ISPConfig for special environments like multiserver setup, mirror or to select only some services to be configured.
With the standard mode we will have following components installed with ISPConfig3 :

  • Web Server (option to choose between Apache and Nginx)
  • FTP server (pureftpd)
  • DNS Server (bind9)
  • MySQL server (database server)
  • Awstats for (statistics application)
  • IMAP and POP3 (option to choose between Courier and Dovecot)
  • Webmail (option to choose between RoundCube and SquirellMail)

First of all we’ll enter the ispconfig_setup-master/ directory (which was created when you unzipped the compressed installation script for ispconfig 3), and then launch the script

 cd ispconfig_setup-master/
./install.sh 

After launching the script the installation will begin and should look similar to this :

 =========================================
ISPConfig 3 System installer
=========================================

This script will do a nearly unattended intallation of
all software needed to run ISPConfig 3.
When this script starts running, it'll keep going all the way
So before you continue, please make sure the following checklist is ok:

- This is a clean / standard debian installation
- Internet connection is working properly


The detected Linux Distribution is: Debian GNU/Linux 8 (jessie)

Is this correct? (y/n) 

As soon as the script initiates, it will attempt to detect your distribution if it is installed OR is it compatible with the script or not, in this case it will detect Debian 7 Wheezy.

If the detected distribution is correct for you then press “y”, and then you will be asked the following questions (as it will attempt to install all the application packages as explained earlier in this article) :

  • It will prompt for your MySql password.
  • Then it will prompt you to choose between Apache and Nginx.
  • Then it will prompt for Xcache (compression system for PHP).
  • Then it will prompt to PHPMyAdmin installation.
  • Then it will prompt to choose between mail server type Dovecot and Courier.
  • Then it will prompt to choose to update virus definition (we recommend to choose yes).
  • Then it will prompt to choose to enable or not quota (we recommend to choose yes).
  • Finally, you will be asked to choose between standard or expert mode. For this article we will choose standard mode.

Standard Mode Installation

Standard mode is the fastest and easiest way to install ISPConfig 3 on Debian with all the features enabled.
As the standard mode installation will progress, it will prompt you to respond to some questions. Most of them can be answered with yes but a couple of them require attention:

  • Now you will be prompted to install Jailkit (please note that Jailkit as normal installation, could only be installed for now)
  • Then you will be prompted to choose whether to enable or not DKIM (it’s recommended to say no)
  • Then you will be prompted to choose between Roundcube and Squirellmail (attention: For Debian 8 there is no option available to install RoundCube, therefor Squirellmaill will be installed by default)
  • At the end  you’ll be asked to configure the SSL, such as typing your Country, STATE, Locality(city), Organization name, and Organization Unit (i.e. department like accounts or sales)

After replying to all of these question, now the installation will take some time to complete and once everything is installed successfully you should see something similar to the following :

 Checking internet connection... OK

Installing pre-required packages
Updating apt and upgrading currently installed packages... [DONE]

Installing basic packages...
Reconfigure dash... [DONE]

Checking and disabling Sendmail...
Installing Postfix... [DONE]

Installing MySQL... [DONE]

Installing Dovecot... [DONE]

Installing Anti-Virus utilities... (This take some time. Don't abort it ...) Stopping Spamassassin ... [DONE]

Disable Spamassassin ... [DONE]

Updating ClamAV. Please Wait ... ERROR: /var/log/clamav/freshclam.log is locked by another process
Restarting ClamAV... [DONE]

Installing Apache and Modules... [DONE]

Installing PHP and Modules... [DONE]

Installing needed Programs for PHP and Apache... [DONE]

===========================================================================================
Attention: When asked 'Configure database for phpmyadmin with dbconfig-common?' select 'NO'
Due to a bug in dbconfig-common, this can't be automated.
===========================================================================================
Press ENTER to continue... 

If you had selected RoundCube as your default email program then you should see these additional lines :

 If you heaven't done yet add roundcube remtoe user in ISPConfig, with the following permission: Server functions - Client functions - Mail user functions - Mail alias functions - Mail spamfilter user functions - Mail spamfilter policy functions - Mail fetchmail functions - Mail spamfilter whitelist functions - Mail spamfilter blacklist functions - Mail user filter functions 

Now the only thing remaining is to add a RoundCube remote user from the ISPConfig cpanel. In order to achieve this task we’ll follow these steps :
You’ll have to connect to ISPConfig web-interface through https://youripaddress:8080
Once there, go to System > User Management > Remote Users and then click on the button that says ‘Add new user’.
Please note that the default username and password to access ISPConfig 3 cpanel is admin:admin. Of course you need to change the password as soon as possible!

Now enter username and password for the new user…

After doing so, you will have to enable the following functions :

  • Server functions
  • Client functions
  • Mail user functions
  • Mail alias functions
  • Mail spamfilter user functions
  • Mail spamfilter policy functions
  • Mail fetchmail functions
  • Mail spamfilter whitelist functions
  • Mail spamfilter blacklist functions
  • Mail user filter functions

And then click on ‘Save’.

Finally, edit the file roundcube config file /var/lib/roundcube/plugins/ispcofig3_account/config/config.inc. php which already sets the user and password you had given in ISPConfig :

 <!--?php 
$rcmail_config['identity_limit'] = false;
$rcmail_config['remote_soap_user'] = 'alice';
$rcmail_config['remote_soap_pass'] = 'ctcOzWC!6;
$rcmail_config['soap_url'] = 'http://YOURIP:8080/remote/';
?--> 

Troubleshooting

Once successfully installed and configured, should you face any problem you can take a look at the log file to inspect and investigate the issue :

 cat /var/log/ispconfig_setup.log 

Feel free to contact us if you believe you’re still facing issues following these steps. Rackhansa Professionals are always ready to help their customers in making their online presence smooth and uninterrupted. Our free webhosting services have also been devised mainly for those entrepreneurs who have just jumped into online business. To know more about our services, please visit our products page to enjoy the cheap hosting plans.