ISPConfig 3.1: Automated installation on Debian 9
As you might know, ISPConfig is one of the best free open source hosting control panels available to manage Linux hosting servers in single and multi-server environments.
Today you will see how to deploy and install this amazing control panel with the ispconfig_setup script. This script is available for free on GitHub at https://github.com/servisys/ispconfig_setup, developed and maintained free from Servisys with the help of the community.
The script, for now, works only on the following distribution
- Debian 9 Stretch
- Debian 8 Jessie
- Debian 7 Wheezy
- Ubuntu 14.04 Trusty
- Ubuntu 15.10 Willy
- Ubuntu 16.04 Xenial Xerus
- Ubuntu 18.04 Bionic Beaver
- CentOS 7
and uses the script of ISPConfig 3.x.
For each of the mentioned distribution, the server must be prepared following the Perfect Minimal Setup guide for each distro which can be found on HowtoForge.
In this guide we'll install on Debian 9, so please before we start, prepare the server following https://www.howtoforge.com/tutorial/debian-minimal-server/.
Download and preparation
Now we download and decompress the files needed for the installation, to do so we execute the following commands as root user:
cd /tmp; wget --no-check-certificate -O installer.tgz "https://github.com/servisys/ispconfig_setup/tarball/master"; tar zxvf installer.tgz; cd *ispconfig*; bash install.sh
Now you had a folder called ispconfig_setup-master in your /tmp directory.
ISPConfig 3 Installation
Now the process to install our ISPConfig control panel with the autoinstall script will start automatically. The script has two install modes: the standard mode and the expert 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.
In the standard setup the following components will be installed:
- Web Server (Apache or Nginx)
- FTP server (with pureftpd)
- DNS Server (bind9)
- MySQL server as database server
- Awstats for statistics purpose
- IMAP and POP3 (with courier or dovecot)
- webmail (with RoundCube or squirellmail)
- ... and obviously ISPConfig
Let's start with common commands for both modes, then we follow the install process from both modes.
Now the install process begin, we can see now the following output:
Welcome to ISPConfig Setup Script v.22.214.171.124
This software is developed by Temporini Matteo
with the support of the community.
You can visit my website at the followings URLs
and contact me with the following information
contact email/Hangouts: [email protected]
ISPConfig 3 System installer
This script will do a nearly unattended installation of
all software needed to run ISPConfig 3.
When this script starts running, it will keep going all the way
So, before you continue, please make sure the following checklist is ok:
- This is a clean standard clean installation for supported systems
- Internet connection is working properly
The detected Linux Distribution is: Debian GNU/Linux 9 (stretch)
Processor (CPU): Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
CPU Cores: 4
Architecture: x86_64 (64-bit)
Total memory (RAM): 2.004 MiB (2.101 MB)
Total swap space: 2.045 MiB (2.145 MB)
Graphics Processor (GPU): VMware SVGA II Adapter
Computer name: debian9
IPv4 address: 192.168.2.55
Time zone: Europe/Rome (CEST, +0200)
Virtual Machine (VM) hypervisor: vmware
Installing for this Linux Distribution: debian9
Is this correct? (y/n)
At this point, the installation process checks your distribution to detect if the installed OS is compatible with the script, in my case it will detect Debian 9 Stretch.
If it's correct for you press 'y', and now you'll be asked some question before the automated install process will start. If you don't know the answer to a question then choose the default by just hitting enter.
- You will be asked for MySql password
- Next you had to choose between Apache and Nginx
- Next you can choose to install php5.6 concurrently with php7 wich is the defaul php version for Debian 9
- Next you will be asked to choss to install HHVM (Hip Hop Virtual Machine)
- Next you will be asked for PHPMyAdmin installation
- Next you had to choose to update virus definition (recommend to say yes)
- Next you had to choose to enable or not quota (recommend to say yes)
- Next you had to choose between mail server type dovecot or courier
- Next you had to choose to enable or not JailKit
- Next you had to choose between Roundcube and SquirrelMail
- The last thing at this chapter is standard o expert mode installation
So we choose standard mode installation, the fastest and most easy way to install ISPConfig in a single server setup with all feature enabled.
In case that you don't know what to respond to a question, simply hit enter, the defaults are good in most cases.
- Next you have to choose to install Jailkit (attention Jailkit as normal installation, could only be installed now)
- Next you have to choose if enable or not DKIM (recommended to say no, because not supported natively in ISPConfig yet, Dkim will be part of the next ISPConfig release)
- Next you have to choose between Roundcube and Squirellmail (Note: in Debian 8 this option is not available as there is no RoundCube package for Debian 8 yet and Squirellmail will be the default)
- Next you'll be asked for SSL Configuration: Country, STATE, Locality, Organization, Organization Unit
Now you can go to take a coffee and relax, waiting for the install process to finish. When everything is installed you can see something similar on the console:
Preparing to install... [DONE]
Updating apt package database and upgrading currently installed packages... [DONE]
Installing basic packages (OpenSSH server, NTP, binutils, etc.)... [DONE]
Changing the default shell from dash to bash... [DONE]
Installing Database server (MariaDB)... [DONE]
Restarting MariaDB... [DONE]
Installing Web server (Apache) and modules... [DONE]
Installing PHP and modules... [DONE]
Installing PHP-FPM... [DONE]
Installing needed programs for PHP and Apache (mcrypt, etc.)... [DONE]
Configurazione di dbconfig-mysql (2.0.8)...
Configurazione di php-bz2 (1:7.0+49)...
Configurazione di phpmyadmin (4:4.6.6-4)...
Due to a bug in dbconfig-common, we can't automate PHPMyAdmin installation for now. So hit 'enter' and on the next question select 'NO' (attention because the default is 'YES').
The final thing to do is to set a secure password for the RoundCube remote user in ISPConfig control panel which the install script has added. To do so follow these steps:
Connect to ISPConfig: https://YOURIP:8080, go to System > User Management > Remote Users and click on the user roundcube in the list:
Enter a secure password for the user...
Then click on Save.
Then edit the file /var/lib/roundcube/plugins/ispconfig3_account/config/config.inc.php and set the password you inserted in ispconfig. See the following example:
$rcmail_config['remote_soap_pass'] = 'password';
In my case, I've used "roundcube" as "password" for the password (please don't use this password in a production environment for obviously security reasons).
The only difference with the standard mode is the ISPconfig installation script, that is not automated yet and has to be run manually. As mentioned before this is necessary for multiserver setups, single server setups that run just some services and cluster setups.
Important: The current version of the install script has an issue, it installs the software spampd which causes the postfix mail system to fail. Spampd is not used nor required by ISPConfig and needs to be uninstalled to get the mail system up. To fix the issue, run these commands:
apt-get -y remove spampd
service postfix restart
After everything is installed, you can check for errors or strange things with the command
As the script is in constant development any help or suggestion will be appreciated, you can follow us on GitHub at the URL https://github.com/servisys/ispconfig_setup, or contact us on ISPconfig forum.