Der perfekte Server – Debian 8.6 (nginx, BIND, Dovecot, ISPConfig 3.1)
18 RoundCube installieren
Roundcube ist im Debian 8-Hauptrepository nicht verfügbar, aber wir können es über die Backports beziehen.
Installiere RoundCube mit diesem Befehl:
apt-get install roundcube roundcube-core roundcube-mysql roundcube-plugins
Der Installateur wird die folgenden Fragen stellen:
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
Bearbeiten Sie dann die Datei RoundCube /etc/roundcube/config.inc.php und passen Sie einige Einstellungen an:
nano /etc/roundcube/config.inc.php
Setzt den default_host und smtp_server auf localhost.
$config['default_host'] = 'localhost'; $config['smtp_server'] = 'localhost';
ISPConfig hat eine gewisse Konfiguration in den nginx apps vhost for squirrelmail, die auch für roundcube funktioniert. Wir aktivieren es mit:
ln -s /usr/share/roundcube /usr/share/squirrelmail
Nun können Sie wie folgt auf den RoundCube zugreifen:
http://192.168.1.100:8081/webmail
http://server1.example.com:8081/webmail (nachdem Sie ISPConfig installiert haben, siehe nächstes Kapitel)
19 ISPConfig 3 installieren
Bevor Sie die ISPConfig-Installation starten, stellen Sie sicher, dass der Apache gestoppt ist (falls er installiert ist – es ist möglich, dass einige Ihrer installierten Pakete den Apache als Abhängigkeit installiert haben, ohne dass Sie es wissen). Wenn Apache2 bereits auf dem System installiert ist, stoppen Sie es jetzt…..
service apache2 stop
…. und entfernen Sie die Systemstartup-Links von Apache:
update-rc.d -f apache2 remove
Stellen Sie sicher, dass nginx läuft:
service nginx restart
(Wenn Sie sowohl Apache als auch nginx installiert haben, fragt Sie das Installationsprogramm, welches Sie verwenden möchten: Apache und nginx erkannt. Wählen Sie den Server aus, der für ISPConfig verwendet werden soll: (apache,nginx) [apache]:
Typ nginx. Wenn nur Apache oder nginx installiert sind, wird dies vom Installer automatisch erkannt und keine Frage gestellt.)
Um ISPConfig 3 von der neuesten freigegebenen Version zu installieren, gehen Sie wie folgt vor:
cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz tar xfz ISPConfig-3-stable.tar.gz cd ispconfig3_install/install/
Der nächste Schritt ist die Ausführung von
php -q install.php
Dadurch wird das Installationsprogramm von ISPConfig 3 gestartet. Der Installer konfiguriert alle Dienste wie Postfix, SASL, Courier, etc. für Sie. Eine manuelle Einrichtung, wie sie für ISPConfig 2 (Perfect Setup Guides) erforderlich ist, ist nicht erforderlich.
# 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
Apache and nginx detected. Select server to use for ISPConfig: (apache,nginx) [apache]: <-- nginx
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 Nginx
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 UFW 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.
Das Installationsprogramm konfiguriert automatisch alle zugrunde liegenden Dienste, so dass keine manuelle Konfiguration erforderlich ist.
Danach können Sie auf ISPConfig 3 unter http(s)://server1.example.com:8080/ oder http(s)://192.168.1.100:8080/ zugreifen ( http oder https hängt davon ab, was Sie bei der Installation gewählt haben). Melden Sie sich mit dem Benutzernamen admin und dem Passwort admin an (Sie sollten das Standardpasswort nach Ihrer ersten Anmeldung ändern):
Das System ist nun einsatzbereit.
20.1 ISPConfig 3 Handbuch
Um die Bedienung von ISPConfig 3 zu erlernen, empfehle ich Ihnen dringend, das ISPConfig 3 Handbuch herunterzuladen.
Auf mehr als 300 Seiten wird das Konzept von ISPConfig (Admin, Reseller, Clients) behandelt, die Installation und Aktualisierung von ISPConfig 3 erklärt, eine Referenz für alle Formulare und Formularfelder in ISPConfig sowie Beispiele für gültige Eingaben enthalten und Tutorials für die häufigsten Aufgaben in ISPConfig 3 bereitgestellt. Es beschreibt auch, wie Sie Ihren Server sicherer machen können und enthält am Ende einen Abschnitt zur Fehlerbehebung.
21 Zusätzliche Erläuterungen
21.1 OpenVZ
Wenn der Debian-Server, den Sie gerade in diesem Tutorial eingerichtet haben, ein OpenVZ-Container (virtuelle Maschine) ist, sollten Sie dies auf dem Hostsystem tun (ich gehe davon aus, dass die ID des OpenVZ-Containers 101 ist – ersetzen Sie ihn durch die richtige VPSID auf Ihrem 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 Links
- Debian: http://www.debian.org/
- ISPConfig: http://www.ispconfig.org/