The Perfect Server - Debian 8.4 Jessie (Apache2, BIND, Dovecot, ISPConfig 3.1) - Page 3

19 Install RoundCube

Roundcube is not available in the Debian 8 main repository, but we can get it trough the backports.

Add the Backports repository to the /etc/apt/sources.list file:

echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list

and run apt-get update.

apt-get update

Then install RoundCube with this command:

apt-get install roundcube roundcube-core roundcube-mysql roundcube-plugins

The installer will ask the following questions:

Configure database for roundcube with dbconfig.common? <-- yes
Select the database type: <-- mysql
Password of the databases administrative user: <-- enter the MySQL root password here.
MySQL application password for roundcube: <-- press enter

Then edit the RoundCube /etc/roundcube/config.inc.php file and adjust a few settings:

nano /etc/roundcube/config.inc.php

Set the default_host and smtp_server to localhost.

$config['default_host'] = 'localhost';
$config['smtp_server'] = 'localhost';

Then edit the Apache roundcube configuration file /etc/apache2/conf-enabled/roundcube.conf:

nano /etc/apache2/conf-enabled/roundcube.conf

And add an alias line for the apache /webmail alias, you can add the line right at the beginning of the file. NOTE: Do not use /mail as alias or the ispconfig email module will stop working!

Alias /webmail /var/lib/roundcube

Then reload Apache:

service apache2 reload

Now you can access RoundCube as follows:

http://192.168.1.100/webmail
http://www.example.com/webmail
http://server1.example.com:8080/webmail
(after you have installed ISPConfig, see the next chapter)

 

20 Download ISPConfig 3

To install ISPConfig 3 from the latest released version, do this:

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

As of today (April 12, 2016), the final of ISPConfig 3.1 is not availble for download yet. If you like to try out the pre-release of the upcoming 3.1 version, download it with this command:

cd /tmp
wget -O ISPConfig-3.1-beta.tar.gz  https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1
tar xfz ISPConfig-3.1-beta.tar.gz
cd ispconfig3-stable-3.1*
cd install

21 Install ISPConfig

The next step is to run the ISPConfig installer.

php -q install.php

This will start the ISPConfig 3 installer. The installer will configure all services like Postfix, Dovecot, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not necessary.

NOTE: Do not be alarmed that the ISPConfig 3 installer identifies Debian Jessie as unknown version. This does not interfere with any functionality and will be fixed with the next ISPConfig update.

# php -q install.php


--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |
|___/
--------------------------------------------------------------------------------


>> Initial configuration

Operating System: Debian 8.0 (Jessie) or compatible

Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with <ENTER>.
Tap in "quit" (without the quotes) to stop the installer.


Select language (en,de) [en]: <-- Hit Enter

Installation mode (standard,expert) [standard]: <-- Hit Enter

Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.canomi.com]: <-- Hit Enter

MySQL server hostname [localhost]: <-- Hit Enter

MySQL server port [3306]: <-- Hit Enter

MySQL root username [root]: <-- Hit Enter

MySQL root password []: <-- Enter your MySQL root password

MySQL database to create [dbispconfig]: <-- Hit Enter

MySQL charset [utf8]: <-- Hit Enter

Configuring Postgrey
Configuring Postfix
Generating a 4096 bit RSA private key
.......................................................................++
........................................................................................................................................++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the  state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit Enter
Configuring Mailman
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring BIND
Configuring Jailkit
Configuring Pureftpd
Configuring Apache
Configuring vlogger
Configuring Metronome XMPP Server
writing new private key to 'localhost.key'
-----
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) [server1.canomi.com]: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit Enter

Configuring Ubuntu Firewall
Configuring Fail2ban
[INFO] service OpenVZ not detected
Configuring Apps vhost
Installing ISPConfig
ISPConfig Port [8080]:

Admin password [admin]:

Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- Hit Enter

Generating RSA private key, 4096 bit long modulus
.......................++
................................................................................................................................++
e is 65537 (0x10001)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the  state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit Enter

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: <-- Hit Enter
An optional company name []: <-- Hit Enter
writing RSA key


Configuring DBServer
Installing ISPConfig crontab
no crontab for root
no crontab for getmail
Detect IP addresses
Restarting services ...
Installation completed.

The installer automatically configures all underlying services, so no manual configuration is needed.

Afterwards you can access ISPConfig 3 under http(s)://server1.example.com:8080/ or http(s)://192.168.1.100:8080/ ( http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):

The system is now ready to be used.

 

 

22 Additional Notes

22.1 OpenVZ

If the Debian server that you've just set up in this tutorial is an OpenVZ container (virtual machine), you should do this on the host system (I'm assuming that the ID of the OpenVZ container is 101 - replace it with the correct VPSID on your system):

VPSID=101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
  vzctl set $VPSID --capability ${CAP}:on --save
done

 

Share this page:

9 Comment(s)

Add comment

Comments

From: Indervir Singh at: 2016-05-11 11:36:15

Could you please make this tutorial with PHP7 PHP-FPM. It would be amazing.

From: till at: 2016-05-15 08:20:55

Please see here: https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/

From: lolbrin at: 2016-05-31 14:25:48

Hello!

I tryed this guide, but have two problems, the whole e-mail menu not working, the sidebar show but the content not changes.

I tried on Google Compute Engine and on Virtualbox too both ISPconfig stable and ISPconfig beta.

Can you please tell me, where should i look for the problem?

Thanks

From: till at: 2016-05-31 14:28:45

Just a guess: You added a global Alias for /mail in the squirrelmail configuration file instead of /webmail (as written in this tutorial). Edit the squirrelmail apache config file again, change /mail to /webmail, and restart apache.

From: lolbrin at: 2016-05-31 14:41:22

Thanks! yes that was the problem, sorry for skipping your line.

Can i ask that too, why should i want mysql to listen on all the interfaces not only on 127.0.0.1?

From: till at: 2016-05-31 15:09:29

In ISPConfig, you can set for each database if it is accessible from outside or not. But this will only work if MySQL listens on all interfaces, so you have to configure MySQL to listen on all interfaces to enable ISPConfig to configure external access on a per database level.

From: lolbrin at: 2016-05-31 19:23:00

thanks Till, you are the man!

From: lolbrin at: 2016-06-01 07:04:35

Thanks Till! Hava an another problem.

I am very interested in Jabber / XMPP feature, i cannot make it work yet, waiting for the updated manual.

But i have an error every time i click on XMPP Domain / SSL:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'ROOT_DOMAIN.TLDN'' at line 1

From: mart28 at: 2016-11-11 10:21:50

HelloI am following your steps in a virtual malina. Everything works fine, I go into http://192.168.1.100/webmail But after installation.Ispconfig 3 with sslI get this error

[email protected]:/home/yo# systemctl status apache2.service? apache2.service - LSB: Apache2 web server   Loaded: loaded (/etc/init.d/apache2)  Drop-In: /lib/systemd/system/apache2.service.d           ??forking.conf   Active: failed (Result: exit-code) since Fri 2016-11-11 10:40:16 CET; 7min ago  Process: 566 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)Nov 11 10:40:09 debian apache2[566]: Starting web server: apache2 failed!Nov 11 10:40:09 debian apache2[566]: The apache2 configtest failed. ... (....Nov 11 10:40:09 debian apache2[566]: Output of config test was:Nov 11 10:40:09 debian apache2[566]: AH00526: Syntax error on line 33 of ...:Nov 11 10:40:09 debian apache2[566]: Invalid command 'SuexecUserGroup', p...nNov 11 10:40:09 debian apache2[566]: Action 'configtest' failed.Nov 11 10:40:09 debian apache2[566]: The Apache error log may have more i....Nov 11 10:40:16 debian systemd[1]: apache2.service: control process exit...=1Nov 11 10:40:16 debian systemd[1]: Failed to start LSB: Apache2 web server.Nov 11 10:40:16 debian systemd[1]: Unit apache2.service entered failed state.Nov 11 10:47:19 debian systemd[1]: Unit apache2.service cannot be reload...e.

 

 

Do I need to change the vpsid?How do I get it in vmware?Thank you