The Perfect Server - Debian 9 (Stretch) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1 - Page 3

19 Install RoundCube

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
MySQL application password for roundcube: <-- press enter
Password of the databases administrative user: <-- enter the MySQL root password here.

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/

If you like to try out the pre-release of an upcoming 3.1 version, download it with this command:

cd /tmp
wget -O ISPConfig-3.1-dev.tar.gz  https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1
tar xfz ISPConfig-3.1-dev.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.

# php -q install.php

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

>> Initial configuration
Operating System: Debian 9.0 (Stretch) 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

22.2 Virtual machine image download of this tutorial

This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual machine image uses the following login details:

SSH / Shell Login

Username: administrator
Password: howtoforge

Username: root
Password: howtoforge

ISPConfig Login

Username: admin
Password: admin

MySQL Login

Username: root
Password: howtoforge

The IP of the VM is 192.168.1.100, it can be changed in the file /etc/network/interfaces. Please change all the above passwords to secure the virtual machine. 

Share this page:

Suggested articles

20 Comment(s)

Add comment

Comments

By: tucuta

Hello again:In step 19 I do not ask: Password of the databases administrative user:This is normal too ...?

By: till

Yes, that's possible depending on your MySQL or MariaDB setup. apt asks for a password only when it needs that password for the connection to the database.

By: tucuta

Ok till.Again thank you very much.

By: tucuta

Ok till.I'm finished but I have a problem.I made my user and Resync ispconfig and all good. Then configure my first domain (mydomain.me) on my server (clients.mydomain.me) and when I resynchronize it appears: "The following changes are not yet populated to all servers".I do not know if it's for the domain, but I'll continue to do tests and if there is something I might not know how to fix it back.If you have any advice would be great and again thank you.

By: till

Please post in the forum to get help, not here in the comments. Not populated changes can e.g. mean that the cron daemon is not running on your system. Writing changes to disk takes up to 1 minute. You can see in the monitor in ISPConfig (jobqueue), which changes are pending.

By: wsogmm

OVA hea German keyboard layout!!

By: till

See here on how to change the Layout: https://wiki.debian.org/Keyboard or https://superuser.com/questions/646425/permanently-change-default-language-and-keyboard-settings-what-am-i-missing

By: Luis Urbina G.

Hello, I installed ISPconfig 3.1 without problems in Debian 9.1, but I needs few PHP version like 5.6 and 7.1 too, I follow this tutorial how-to-install-php-7-for-ispconfig-3-from-debian-packages-on-debian-8-and-9/ and everything looks like ok, but when I restart after install PHP 5.6 and 7.1 only, because this tutorial came with PHP 7.0 my server crash, what can I do to resolve this issue?

Thanks

By: Firman_syah

I have finished installing and all can run well, next I want to install nextcloud can it? anything I need to change

By: kharzog valentis

 PS: if you download the vm, the above user/pass for ipconfig is wrong

its actually

ISPConfig Login

Username: admin Password: howtoforge

By: kharzog valentis

also of note, to change the keyboard layout to us you must run 

nano /etc/default/keyboard

and change this line to XKBLAYOUT="us"

until then z=y and y=z amoung other things...

and i beleive {shift}-7 was the slash (/) key (important for typing the path)

By: nmazza

https://96.126.115.158/webmail/Ha ocurrido un error durante una conexión a 96.126.115.158. SSL ha recibido un registro que excedía la longitud máxima permitida. Código de error: SSL_ERROR_RX_RECORD_TOO_LONGAny idea, I'm newer on Debian

By: till

use: http://96.126.115.158/webmail/ instead of https://96.126.115.158/webmail/

By: FredZinsli

I finally have ISPconfig working. but have several questions.

How do I configure postfix to send emails via a smart host?

How do I configure a site to allow PHPBB3 to install?

How to I configure a site to allow Drupal 8 to install (single site)?

Regards

Fred

By: MikySal78

for multi server?

By: pinguinito

I just finished the installation. How ever I can not login in ISPconfig with admin admin or any other combination

By: 30uke

Thank you very much for this tutorial. It's very helpful. I am running ISPConfig for over a month now.

By: MaxT

another perfect tutorial, lot of thanks!.

 

I have this only error with rkhunter:Errors were encountered while processing: rkhunterE: Sub-process /usr/bin/dpkg returned an error code (1)

not solved trying to install a previous .deb of Rkhunter

Just ignore it and follow the installation until the end. Then remove rkhunter to install manually:

# apt-get -f remove rkhunter# cd /tmp# wget http://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.2/rkhunter-1.4.2.tar.gz# tar xzvf rkhunter*# cd rkhunter*# ./installer.sh --layout /usr --install

 

probably you will see another one when updating rkhunter:

# rkhunter --updateInvalid WEB_CMD configuration option: Relative pathname: "/bin/false"modify these lines inside /etc/rkhunter.conf

UPDATE_MIRRORS=0 to UPDATE_MIRRORS=1MIRRORS_MODE=1 to MIRRORS_MODE=0WEB_CMD="/bin/false" to WEB_CMD=""

then update again and it will work:

# rkhunter --update

By: Tata

On the user's ssh account, git does not work, eg 'git pull':fatal: Unable to find remote helper for 'https'

Git works for root only.

By: till

You probably created a ja8iled SSH account which does not contain git. Either create an unjailed SSH account or add the programs that you want to use (in this case git) to the jail of the SSH user.