Der perfekte Server CentOS 7.6 mit Apache, PHP 7.2, Postfix, Dovecot, Pure-FTPD, BIND und ISPConfig 3.1

21 Roundcube-Webmail installieren

Um den RoundCube Webmail-Client zu installieren, laden Sie die neueste Version mit wget in den Ordner /tmp herunter:

cd /tmp
wget https://github.com/roundcube/roundcubemail/releases/download/1.3.9/roundcubemail-1.3.9-complete.tar.gz

Entpacken Sie das tar.gz-Archiv und verschieben Sie den Roundcube-Quellcode nach /usr/share/roundcubemail

tar xfz roundcubemail-1.3.9-complete.tar.gz
mkdir /usr/share/roundcubemail
mv /tmp/roundcubemail-1.3.9/* /usr/share/roundcubemail/
chown -R root:root /usr/share/roundcubemail
chown apache /usr/share/roundcubemail/temp
chown apache /usr/share/roundcubemail/logs

Erstellen Sie eine Konfigurationsdatei roundcubemail.conf mit dem nano editor:

nano /etc/httpd/conf.d/roundcubemail.conf

Und fügen Sie den folgenden Inhalt zu dieser Datei hinzu:

#
# Round Cube Webmail is a browser-based multilingual IMAP client
#

Alias /roundcubemail /usr/share/roundcubemail
Alias /webmail /usr/share/roundcubemail

# Define who can access the Webmail
# You can enlarge permissions once configured

<Directory /usr/share/roundcubemail/>
        Options none
        AllowOverride Limit
        Require all granted
</Directory>

# Define who can access the installer
# keep this secured once configured

<Directory /usr/share/roundcubemail/installer>
        Options none
        AllowOverride Limit
        Require all granted
</Directory>


# Those directories should not be viewed by Web clients.
<Directory /usr/share/roundcubemail/bin/>
    Order Allow,Deny
    Deny from all
</Directory>
<Directory /usr/share/roundcubemail/plugins/enigma/home/>
    Order Allow,Deny
    Deny from all
</Directory>

Starten Sie Apache neu:

systemctl restart httpd.service

Nun benötigen wir eine Datenbank für RoundCube-Mail, die wir wie folgt initialisieren werden:

mysql -u root -p

An der MariaDB Eingabeaufforderung verwenden:

CREATE DATABASE roundcubedb;
CREATE USER roundcubeuser@localhost IDENTIFIED BY 'roundcubepassword';
GRANT ALL PRIVILEGES on roundcubedb.* to roundcubeuser@localhost ;
FLUSH PRIVILEGES;
exit

Ich benutze die Details für die RoundCube-Datenbank als Beispiel, bitte ersetzen Sie die Werte aus Sicherheitsgründen nach Ihrer Wahl.

Nun werden wir RoundCube im Browser unter http://192.168.0.100/roundcubemail/installer installieren.

Erstellen Sie nun die Datei config.inc.php:

nano /usr/share/roundcubemail/config/config.inc.php
<?php
/* Local configuration for Roundcube Webmail */

// ----------------------------------
// SQL DATABASE
// ----------------------------------
// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysql://roundcubeuser:roundcubepassword@localhost/roundcubedb';

// ----------------------------------
// IMAP
// ----------------------------------
// The IMAP host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
// required to match old user data records with the new host.
$config['default_host'] = 'localhost';

// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$config['support_url'] = '';

// This key is used for encrypting purposes, like storing of imap password
// in the session. For historical reasons it's called DES_key, but it's used
// with any configured cipher_method (see below).
$config['des_key'] = 'pb0UucO0eqjgvhrqYlFTBVjE';

// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
$config['plugins'] = array();

// Set the spell checking engine. Possible values:
// - 'googie' - the default (also used for connecting to Nox Spell Server, see 'spellcheck_uri' setting)
// - 'pspell' - requires the PHP Pspell module and aspell installed
// - 'enchant' - requires the PHP Enchant module
// - 'atd' - install your own After the Deadline server or check with the people at http://www.afterthedeadline.com before using their API
// Since Google shut down their public spell checking service, the default settings
// connect to http://spell.roundcube.net which is a hosted service provided by Roundcube.
// You can connect to any other googie-compliant service by setting 'spellcheck_uri' accordingly.
$config['spellcheck_engine'] = 'pspell';
$config['enable_installer'] = true;

Dann drücken Sie „weiter“ im Web-Installationsprogramm. Auf der folgenden Seite drücken Sie auf die Schaltfläche „Datenbank initialisieren“.

Abschließend deaktivieren Sie das Roundecubemail-Installationsprogramm. Ändern Sie die RoundCube-Konfigurationsdatei config.inc.php

nano /usr/share/roundcubemail/config/config.inc.php

und ändern Sie die Zeile:

$config['enable_installer'] = true;

zu:

$config['enable_installer'] = false;

Roundcube ist jetzt unter den Aliasen /webmail und /roundcubemail auf Ihrem Server verfügbar:

http://192.168.0.100/webmail

Der RoundCube-Login ist die E-Mail-Adresse und das Passwort eines E-Mail-Kontos, das Sie später in ISPConfig anlegen.

22 ISPConfig 3.1 installieren

Das ISPConfig-Installationsprogramm wird alle Dienste wie Postfix, Dovecot, etc. für Sie konfigurieren.

Sie haben jetzt auch die Möglichkeit, den Installer einen SSL-Vhost für das ISPConfig-Kontrollfeld erstellen zu lassen, so dass auf ISPConfig über https:// statt über http:// zugegriffen werden kann. Um dies zu erreichen, drücken Sie einfach ENTER, wenn Sie diese Frage sehen: Wünschen Sie eine sichere (SSL-)Verbindung zur ISPConfig-Webschnittstelle (y,n) [y]:.

Um ISPConfig 3.1 aus dem stabilen GIT-Zweig zu installieren, tun Sie dies:

cd /tmp 
wget -O ispconfig.tar.gz https://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ispconfig.tar.gz
cd ispconfig3*/install/

Der nächste Schritt ist die Ausführung:

php -q install.php

Dadurch wird das ISPConfig 3-Installationsprogramm gestartet. Das Installationsprogramm wird alle Dienste wie Postfix, Dovecot, etc. für Sie konfigurieren. Ein manuelles Setup, wie es für ISPConfig 2 (perfekte Setup-Anleitungen) erforderlich ist, ist nicht notwendig.

[root@server1 install]# php install.php
--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |
|___/
--------------------------------------------------------------------------------
>> Initial configuration
Operating System: CentOS 7.6
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.example.com]: <-- Hit Enter
MySQL server hostname [localhost]: <-- Hit Enter
MySQL server port [3306]: <-- Hit Enter
MySQL root username [root]: <-- Hit Enter
MySQL root password []: <-- Ente the MySQL root password here
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) [XX]: <-- Enter 2 Letter country code, e.g. US
State or Province Name (full name) []: <-- Enter anme of State or Province
Locality Name (eg, city) [Default City]: <-- Name of city
Organization Name (eg, company) [Default Company Ltd]: <-- Company name
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (eg, your name or your server's hostname) []: <-- Enter server hostname here, in my case: server1.example.com
Email Address []: <-- Enter Email address
Configuring mailman
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Jailkit
Configuring Pureftpd
Configuring BIND
Configuring Apache
Configuring vlogger
[INFO] service OpenVZ not detected
Configuring Bastille Firewall
[INFO] service Metronome XMPP Server not detected
Configuring Fail2ban
Configuring Apps vhost
Installing ISPConfig
ISPConfig Port [8080]: <-- Hit Enter
Admin password [fad579a6]: <-- Enter new password for ISPConfig admin user
Re-enter admin password []: <-- Repeat the password
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) [XX]: <-- Enter 2 Letter country code, e.g. US
State or Province Name (full name) []: <-- Enter anme of State or Province
Locality Name (eg, city) [Default City]: <-- Name of city
Organization Name (eg, company) [Default Company Ltd]: <-- Company name
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (eg, your name or your server's hostname) []: <-- Enter server hostname here, in my case: server1.example.com
Email Address []: <-- Enter Email address
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
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.

23 Erste ISPConfig-Anmeldung

Danach können Sie auf ISPConfig 3 unter http(s)://server1.example.com:8080/ oder http(s)://192.168.0.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 dem ersten Login ändern):

Die ISPConfig-Anmeldung

24 Links

Das könnte dich auch interessieren …