GNU/Linux >> LINUX-Kenntnisse >  >> Panels >> Panels

Der perfekte Server – CentOS 6.1 x86_64 mit Apache2 [ISPConfig 3]

Der perfekte Server – CentOS 6.1 x86_64 mit Apache2 [ISPConfig 3]

Dieses Tutorial zeigt, wie Sie einen CentOS 6.1 x86_64-Server für die Installation von ISPConfig 3 vorbereiten und ISPConfig 3 installieren. ISPConfig 3 ist ein Webhosting-Kontrollfeld, mit dem Sie die folgenden Dienste über einen Webbrowser konfigurieren können:Apache-Webserver, Postfix Mailserver, MySQL, BIND-Nameserver, PureFTPd, SpamAssassin, ClamAV, Mailman und viele mehr. Seit Version 3.0.4 bietet ISPConfig zusätzlich zu Apache volle Unterstützung für den nginx-Webserver; Dieses Tutorial behandelt die Einrichtung eines Servers, der Apache und nicht Nginx verwendet.

Bitte beachten Sie, dass dieses Setup nicht für ISPConfig 2 funktioniert ! Es gilt nur für ISPConfig 3!

Ich gebe keine Garantie dafür, dass dies bei Ihnen funktioniert!

ISPConfig 3 Handbuch

Um zu lernen, wie man ISPConfig 3 verwendet, empfehle ich dringend, das ISPConfig 3-Handbuch herunterzuladen.

Auf etwa 300 Seiten behandelt es das Konzept hinter ISPConfig (Admin, Reseller, Clients), erklärt, wie ISPConfig 3 installiert und aktualisiert wird, enthält eine Referenz für alle Formulare und Formularfelder in ISPConfig zusammen mit Beispielen für gültige Eingaben und bietet Tutorials für die häufigsten Aufgaben in ISPConfig 3. Es beschreibt auch, wie Sie Ihren Server sicherer machen können, und enthält am Ende einen Abschnitt zur Fehlerbehebung.

ISPConfig Monitor-App für Android

Mit der ISPConfig Monitor App können Sie Ihren Serverstatus überprüfen und herausfinden, ob alle Dienste wie erwartet laufen. Sie können TCP- und UDP-Ports überprüfen und Ihre Server anpingen. Darüber hinaus können Sie diese App verwenden, um Details von Servern anzufordern, auf denen ISPConfig installiert ist (Bitte beachten Sie, dass die installierte Mindestversion von ISPConfig 3 mit Unterstützung für die ISPConfig Monitor App 3.0.3.3 ist! ); Diese Details umfassen alles, was Sie aus dem Monitor-Modul im ISPConfig Control Panel wissen (z. B. Dienste, Mail- und Systemprotokolle, Mail-Warteschlange, CPU- und Speicherinformationen, Festplattennutzung, Quote, Betriebssystemdetails, RKHunter-Protokoll usw.) und natürlich , da ISPConfig Multiserver-fähig ist, können Sie alle Server prüfen, die von Ihrem ISPConfig-Masterserver gesteuert werden.

Anweisungen zum Herunterladen und zur Verwendung finden Sie unter http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.

1 Voraussetzungen

Um ein solches System zu installieren, benötigen Sie Folgendes:

  • Laden Sie die beiden CentOS 6.1-DVDs von einem Spiegel neben Ihnen herunter (die Liste der Spiegel finden Sie hier:http://isoredirect.centos.org/centos/6/isos/x86_64/).
  • eine schnelle Internetverbindung.

2 Vorbemerkung

In diesem Tutorial verwende ich den Hostnamen server1.example.com mit der IP-Adresse 192.168.0.100 und dem Gateway 192.168.0.1. Diese Einstellungen können für Sie abweichen, daher müssen Sie sie gegebenenfalls ersetzen.

3 Installieren Sie das Basissystem

Booten Sie von Ihrer ersten CentOS 6.1-DVD (DVD 1). Wählen Sie Vorhandenes System installieren oder aktualisieren:

Das Testen des Installationsmediums kann lange dauern, daher überspringen wir diesen Test hier:

Der Begrüßungsbildschirm des CentOS-Installationsprogramms wird angezeigt. Klicken Sie auf Weiter:

Wählen Sie als nächstes Ihre Sprache:

Wählen Sie Ihr Tastaturlayout aus:

Ich gehe davon aus, dass Sie eine lokal angeschlossene Festplatte verwenden, daher sollten Sie hier Basic Storage Devices auswählen:

Möglicherweise wird die folgende Warnung angezeigt:Fehler beim Verarbeiten des Laufwerks. Wenn Sie dies sehen, klicken Sie auf die Schaltfläche Alle neu initialisieren, um fortzufahren:

Geben Sie den Hostnamen des Servers ein (z. B. server1.example.com) und klicken Sie dann auf die Schaltfläche Netzwerk konfigurieren:

Gehen Sie zur Registerkarte Verkabelt, wählen Sie die Netzwerkschnittstelle (wahrscheinlich eth0) aus und klicken Sie auf Bearbeiten...:

Aktivieren Sie das Kontrollkästchen Automatisch verbinden und gehen Sie zur Registerkarte IPv4-Einstellungen und wählen Sie im Dropdown-Menü Methode die Option Manuell aus. Geben Sie einen, zwei oder drei Nameserver (durch Komma getrennt) in das Feld DNS-Server ein (z. B. 8.8.8.8, 8.8.4.4) und klicken Sie dann auf die Schaltfläche Hinzufügen neben dem Bereich Adressen:

Geben Sie Ihrer Netzwerkkarte nun eine statische IP-Adresse und Netzmaske (in diesem Tutorial verwende ich zu Demonstrationszwecken die IP-Adresse 192.168.0.100 und die Netzmaske 255.255.255.0; wenn Sie sich nicht sicher sind, welche Werte richtig sind, http://www. subnetmask.info könnte Ihnen helfen). Geben Sie auch Ihr Gateway ein (z. B. 192.168.0.1) und klicken Sie auf die Schaltfläche Anwenden...:

Die Netzwerkkonfiguration ist nun abgeschlossen. Klicken Sie auf die Schaltfläche Weiter:

Der perfekte Server – CentOS 6.1 x86_64 mit Apache2 [ISPConfig 3] – Seite 2

4 /etc/hosts anpassen

Als nächstes bearbeiten wir /etc/hosts. Lass es so aussehen:

vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.0.100   server1.example.com     server1

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

5 Firewall konfigurieren

(Sie können dieses Kapitel überspringen, wenn Sie die Firewall bereits am Ende der grundlegenden Systeminstallation deaktiviert haben.)

Ich möchte ISPConfig am Ende dieses Tutorials installieren, das mit einer eigenen Firewall geliefert wird. Deshalb deaktiviere ich jetzt die standardmäßige CentOS-Firewall. Natürlich steht es Ihnen frei, sie eingeschaltet zu lassen und nach Ihren Bedürfnissen zu konfigurieren (aber dann sollten Sie später keine andere Firewall verwenden, da diese höchstwahrscheinlich die CentOS-Firewall stört).

Ausführen

system-config-firewall

und die Firewall deaktivieren.

Um zu überprüfen, ob die Firewall wirklich deaktiviert wurde, können Sie

ausführen
iptables -L 

nachher. Die Ausgabe sollte so aussehen:

[[email protected] ~]# iptables -L
Chain INPUT (Policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (Policy ACCEPT)
target prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[[email protected] ~]#

6 SELinux deaktivieren

SELinux ist eine Sicherheitserweiterung von CentOS, die erweiterte Sicherheit bieten soll. Meiner Meinung nach brauchen Sie es nicht, um ein sicheres System zu konfigurieren, und es verursacht normalerweise mehr Probleme als Vorteile (denken Sie daran, nachdem Sie eine Woche lang Fehler behoben haben, weil ein Dienst nicht wie erwartet funktioniert hat, und dann Sie feststellen, dass alles in Ordnung war, nur SELinux verursachte das Problem). Daher deaktiviere ich es (dies ist ein Muss, wenn Sie später ISPConfig installieren möchten).

Bearbeiten Sie /etc/selinux/config und setzen Sie SELINUX=disabled:

vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Danach müssen wir das System neu starten:

reboot

7 Zusätzliche Repositories aktivieren und einige Software installieren

Zuerst importieren wir die GPG-Schlüssel für Softwarepakete:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

Dann aktivieren wir die RPMforge- und EPEL-Repositories auf unserem CentOS-System, da viele der Pakete, die wir im Laufe dieses Tutorials installieren werden, nicht in den offiziellen CentOS 6.1-Repositories verfügbar sind:

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

cd /tmp
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release- 0.5.2-2.el6.rf.x86_64.rpm

(Wenn der obige Link nicht mehr funktioniert, finden Sie die aktuelle Version von rpmforge-release hier:http://packages.sw.be/rpmforge-release/)

rpm --import https://fedoraproject.org/static/0608B895.txt
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch. rpm
rpm -ivh epel-release-6-5.noarch.rpm

yum install yum-priorities

Bearbeiten Sie /etc/yum.repos.d/epel.repo...

vi /etc/yum.repos.d/epel.repo

... und fügen Sie die Zeile priority=10 zum Abschnitt [epel] hinzu:

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[...]

Dann aktualisieren wir unsere bestehenden Pakete auf dem System:

yum update

Jetzt installieren wir einige Softwarepakete, die später benötigt werden:

yum groupinstall 'Development Tools'

8 Quote

(Falls Sie ein anderes Partitionierungsschema gewählt haben als ich, müssen Sie dieses Kapitel anpassen, damit Quota für die Partitionen gilt, wo Sie es brauchen.)

Um Quota zu installieren, führen wir diesen Befehl aus:

yum install quota

Bearbeiten Sie /etc/fstab und fügen Sie ,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 zur Partition / (/dev/mapper/vg_server1-lv_root):

hinzu
vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Dec 16 00:22:26 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_server1-lv_root /                       ext4    defaults,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0        1 1
UUID=d995c881-fbc7-409f-bcad-86d255331a3f /boot                   ext4    defaults        1 2
/dev/mapper/vg_server1-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

Dann ausführen

mount -o remount /

quotecheck -avugm
quotaon -avug

zum Aktivieren des Kontingents.

9 Installieren Sie Apache, MySQL, phpMyAdmin

Wir können die benötigten Pakete mit einem einzigen Befehl installieren:

yum install ntp httpd mod_ssl mysql-server php php-mysql php-mbstring phpmyadmin

Der perfekte Server – CentOS 6.1 x86_64 mit Apache2 [ISPConfig 3] – Seite 4

10 Installieren Sie Courier-IMAP, Courier-Authlib und Maildrop

Leider gibt es keine RPM-Pakete für Courier-IMAP, Courier-Authlib und Maildrop, daher müssen wir sie selbst bauen.

Entfernen Sie zuerst Dovecot (CentOS 6.1 kommt mit Dovecot 2.x; leider unterstützt ISPConfig 3 Dovecot 1.2.x, aber nicht 2.x):

yum remove dovecot dovecot-mysql

Installieren Sie dann die Voraussetzungen, die wir zum Erstellen von Courier-RPM-Paketen benötigen:

yum install rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel libidn-devel

RPM-Pakete sollten nicht als Root erstellt werden; courier-imap verweigert sogar die Kompilierung, wenn es feststellt, dass die Kompilierung als Root-Benutzer ausgeführt wird. Deshalb erstellen wir jetzt ein normales Benutzerkonto (in diesem Beispiel falko) und geben ihm ein Passwort:

useradd -m -s /bin/bash falko
passwd falko

Den sudo-Befehl benötigen wir später, damit der Benutzer falko die RPM-Pakete kompilieren und installieren kann. Aber zuerst müssen wir falko erlauben, alle Befehle mit sudo:

auszuführen

Ausführen

visudo

In der sich öffnenden Datei gibt es eine Zeile root ALL=(ALL) ALL. Fügen Sie direkt unter dieser Zeile eine ähnliche Zeile für falko hinzu:

[...]
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
falko   ALL=(ALL)       ALL
[...]

Jetzt können wir unser RPM-Paket erstellen. Werde zuerst der Benutzer falko:

su falko

Als nächstes erstellen wir unsere Build-Umgebung:

mkdir $HOME/rpm
mkdir $HOME/rpm/SOURCES
mkdir $HOME/rpm/SPECS
mkdir $HOME/rpm/BUILD
mkdir $HOME/rpm/BUILDROOT
mkdir $HOME/rpm/SRPMS
mkdir $HOME/rpm/RPMS
mkdir $HOME/rpm/RPMS/i386
mkdir $HOME/rpm/RPMS/x86_64

echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros

Jetzt erstellen wir ein Download-Verzeichnis und laden die Quelldateien von http://www.courier-mta.org/download.php:

herunter

mkdir $HOME/downloads
cd $HOME/downloads

wget https://sourceforge.net/projects/courier/files/authlib/0.63.0/courier-authlib-0.63.0.tar.bz2/download
wget https://sourceforge.net/projects/courier /files/imap/4.9.3/courier-imap-4.9.3.tar.bz2/download
wget https://sourceforge.net/projects/courier/files/maildrop/2.5.5/maildrop-2.5 .5.tar.bz2/download

(Bitte beachten Sie, dass ich hier Courier-IMAP 4.9.3 anstelle des neueren 4.10.0 verwende, da 4.10.0 von systemctl abhängt, das für Fedora existiert, aber nicht für CentOS.)

Jetzt (immer noch in $HOME/downloads) können wir courier-authlib bauen:

sudo rpmbuild -ta courier-authlib-0.63.0.tar.bz2

Nach dem Erstellungsprozess finden Sie die RPM-Pakete in /root/rpmbuild/RPMS/x86_64 (/root/rpmbuild/RPMS/i686, wenn Sie sich auf einem i686-System befinden). Der Befehl

sudo ls -l /root/rpmbuild/RPMS/x86_64

zeigt Ihnen die verfügbaren RPM-Pakete:

[[email protected] downloads]$ sudo ls -l /root/rpmbuild/RPMS/x86_64
insgesamt 528
-rw-r--r-- 1 root root 124008 Dec 16 01:10 curier -authlib-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 270860 Dec 16 01:10 courier-authlib-debuginfo-0.63.0-1.el6. x86_64.rpm
-rw-r--r-- 1 root root  35072 Dec 16 01:10 courier-authlib-devel-0.63.0-1.el6.x86_64.rpm
-rw-r --r-- 1 root root  17368 Dec 16 01:10 courier-authlib-ldap-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  13928 Dec 16 01:10 courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  13076 Dec 16 01:10 courier-authlib-pgsql-0.63. 0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root   8312 Dec 16 01:10 courier-authlib-pipe-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  34064 Dec 16 01:10 courier-authlib-userdb-0.63.0-1.el6.x86_64.rpm
[[email protected] downloads]$

Wählen Sie diejenigen aus, die Sie installieren möchten, und installieren Sie sie wie folgt:

sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/courier-authlib-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-devel-0.63.0-1.el6.x86_64.rpm

Jetzt gehen wir zurück zu unserem Download-Verzeichnis:

cd $HOME/downloads

Führen Sie die folgenden Befehle aus, um erforderliche Verzeichnisse zu erstellen/Verzeichnisberechtigungen zu ändern (da sonst der Erstellungsprozess für Courier-Imap fehlschlägt):

sudo mkdir -p /var/cache/ccache/tmp
sudo chmod o+rwx /var/cache/ccache/
sudo chmod 777 /var/cache/ccache/tmp

Führen Sie jetzt rpmbuild erneut aus, diesmal ohne sudo, sonst schlägt die Kompilierung fehl, weil sie als root ausgeführt wurde:

rpmbuild -ta courier-imap-4.9.3.tar.bz2

Nach dem Erstellungsprozess finden Sie die RPM-Pakete in $HOME/rpm/RPMS/x86_64 ($HOME/rpm/RPMS/i686, wenn Sie sich auf einem i686-System befinden):

cd $HOME/rpm/RPMS/x86_64

Der Befehl

ls -l

zeigt Ihnen die verfügbaren RPM-Pakete:

[[email protected] x86_64]$ ls -l
insgesamt 1116
-rw-rw-r-- 1 falko falko 331908 16. Dezember 01:33 courier-imap-4.9.3-1.x86_64 .rpm
-rw-rw-r-- 1 falko falko 800864 Dec 16 01:33 courier-imap-debuginfo-4.9.3-1.x86_64.rpm
[[email protected] x86_64] $

Sie können courier-imap wie folgt installieren:

sudo rpm -ivh courier-imap-4.9.3-1.x86_64.rpm

Jetzt gehen wir zurück zu unserem Download-Verzeichnis:

cd $HOME/downloads

und führen Sie rpmbuild erneut aus, diesmal um ein Maildrop-Paket zu erstellen:

sudo rpmbuild -ta maildrop-2.5.5.tar.bz2

Nach dem Erstellungsprozess finden Sie die RPM-Pakete in /root/rpmbuild/RPMS/x86_64 (/root/rpmbuild/RPMS/i686, wenn Sie sich auf einem i686-System befinden). Der Befehl

sudo ls -l /root/rpmbuild/RPMS/x86_64

zeigt Ihnen die verfügbaren RPM-Pakete:

[[email protected] downloads]$ sudo ls -l /root/rpmbuild/RPMS/x86_64
insgesamt 1712
-rw-r--r-- 1 root root 124008 Dec 16 01:10 curier -authlib-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 270860 Dec 16 01:10 courier-authlib-debuginfo-0.63.0-1.el6. x86_64.rpm
-rw-r--r-- 1 root root  35072 Dec 16 01:10 courier-authlib-devel-0.63.0-1.el6.x86_64.rpm
-rw-r --r-- 1 root root  17368 Dec 16 01:10 courier-authlib-ldap-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  13928 Dec 16 01:10 courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  13076 Dec 16 01:10 courier-authlib-pgsql-0.63. 0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root   8312 Dec 16 01:10 courier-authlib-pipe-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  34064 Dec 16 01:10 courier-authlib-userdb-0.63.0-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 286480 Dec 16 01:40 maildrop-2.5.5-1.x86_64.rpm
-rw-r--r-- 1 root root 751376 Dec 16 01:40 maildrop-debuginfo-2.5.5- 1.x86_64.r pm
-rw-r--r-- 1 root root 102104 Dec 16 01:40 maildrop-devel-2.5.5-1.x86_64.rpm
-rw-r--r-- 1 root root  65940 Dec 16 01:40 maildrop-man-2.5.5-1.x86_64.rpm
[[email protected] downloads]$

Sie können Maildrop jetzt wie folgt installieren:

sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/maildrop-2.5.5-1.x86_64.rpm

Nachdem Sie alle benötigten Pakete kompiliert und installiert haben, können Sie wieder root werden, indem Sie

eingeben
exit

Starten Sie nun Courier-IMAP/-POP3 wie folgt:

/etc/init.d/courier-imap start 

11 Postfix installieren

Postfix kann wie folgt installiert werden:

yum install postfix

Schalten Sie dann Sendmail aus und starten Sie Postfix und MySQL:

chkconfig --levels 235 mysqld beim
/etc/init.d/mysqld start

chkconfig --levels 235 sendmail aus
chkconfig --levels 235 postfix ein
/etc/init.d/sendmail stop
/etc/init.d/postfix start

12 Installieren Sie Getmail

Getmail kann wie folgt installiert werden:

yum install getmail

13 Legen Sie MySQL-Passwörter fest und konfigurieren Sie phpMyAdmin

Legen Sie Passwörter für das MySQL-Root-Konto fest:

mysql_secure_installation

[[email protected] tmp]# mysql_secure_installation




HINWEIS: DIE AUSFÜHRUNG ALLER TEILE DIESES SKRIPTS WIRD FÜR ALLE MySQL
      SERVER EMPFOHLEN, die sich in Produktion befinden BENUTZEN! BITTE LESEN SIE JEDEN SCHRITT SORGFÄLTIG DURCH!


Um sich bei MySQL anzumelden, um es zu sichern, benötigen wir das aktuelle
Passwort für den Root-Benutzer. Wenn Sie gerade MySQL installiert und
das Root-Passwort noch nicht festgelegt haben, ist das Passwort leer,
also sollten Sie hier einfach die Eingabetaste drücken.

Enter Aktuelles Passwort für Root (Eingabe für Keine):
OK, erfolgreich verwendetes Passwort, weiter ...

Das Festlegen des Root-Passworts stellt sicher, dass sich niemand bei dem MySQL-Root anmelden kann.
Benutzer ohne die richtige Autorisierung.

Root-Passwort festlegen? [Y/n] <-- ENTER
Neues Passwort: <-- yourrootsqlpassword
Neues Passwort erneut eingeben: <-- yourrootsqlpassword
Passwort erfolgreich aktualisiert!
Berechtigungstabellen werden neu geladen. .
 ... Erfolg!


Standardmäßig hat eine MySQL-Installation einen anonymen Benutzer, der ermöglicht, dass sich jeder
bei MySQL anmelden kann, ohne einen Benutzeraccount haben zu müssen für
sie erstellt. Dies ist nur zum Testen sollte und damit die Installation
etwas flüssiger läuft. Sie sollten sie entfernen, bevor Sie in eine
Produktionsumgebung wechseln.

Anonyme Nutzer entfernen? [Y/n] <-- ENTER
 ... Erfolgreich!

Normalerweise sollte root nur erlaubt werden, sich von 'localhost' aus zu verbinden. Dies
stellt sicher, dass niemand das Root-Passwort aus dem Netzwerk erraten kann.

Root-Anmeldung aus der Ferne nicht zulassen? [Y/n] <-- EINGABE
 ... Erfolg!

Standardmäßig wird MySQL mit einer Datenbank namens "test" geliefert, auf die jeder
zugreifen kann. Dies ist auch nur zum Testen vorgesehen und sollte entfernt werden
bevor in eine Produktionsumgebung umgezogen wird.

Testdatenbank und Zugriff darauf entfernen? [Y/n] <-- ENTER
 - Testdatenbank wird gelöscht...
 ... Erfolg!
 - Berechtigungen für Testdatenbank entfernen...
 ... Erfolg !

Durch das Neuladen der Berechtigungstabellen wird sichergestellt, dass alle bisher vorgenommenen Änderungen
sofort wirksam werden.

Berechtigungstabellen jetzt neu laden? [Y/n] <-- EINGABE
 ... Erfolgreich!

Aufräumen ...



Alle fertig! Wenn Sie alle oben genannten Schritte ausgeführt haben, sollte Ihre MySQL
Installation jetzt sicher sein.

Vielen Dank, dass Sie MySQL verwenden!


[example @unixlinux.online tmp]#

Jetzt konfigurieren wir phpMyAdmin. Wir ändern die Apache-Konfiguration so, dass phpMyAdmin Verbindungen nicht nur von localhost zulässt (durch Auskommentieren der Zeilengruppe ):

vi /etc/httpd/conf.d/phpmyadmin.conf
#
#  Web application to manage MySQL
#

#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Als nächstes ändern wir die Authentifizierung in phpMyAdmin von cookie auf http:

vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

Dann erstellen wir die Systemstartlinks für Apache und starten es:

chkconfig --levels 235 httpd on
/etc/init.d/httpd start

Jetzt können Sie Ihren Browser auf http://server1.example.com/phpmyadmin/ oder http://192.168.0.100/phpmyadmin/ leiten und sich mit dem Benutzernamen root und Ihrem neuen root-MySQL-Passwort anmelden.

Der perfekte Server – CentOS 6.1 x86_64 mit Apache2 [ISPConfig 3] – Seite 5

14 Installieren Sie Amavisd-new, SpamAssassin und ClamAV

Um amavisd-new, spamassassin und clamav zu installieren, führen Sie den folgenden Befehl aus:

yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql

Dann starten wir freshclam, amavisd und clamd.amavisd:

sa-update
chkconfig --levels 235 amavisd on
chkconfig --del clamd
chkconfig --levels 235 clamd.amavisd on
/usr/bin/freshclam
/etc/init.d/amavisd start
/etc/init.d/clamd.amavisd start

15 Installation von Apache2 mit mod_php, mod_fcgi/PHP5 und suPHP

ISPConfig 3 ermöglicht Ihnen die Verwendung von mod_php, mod_fcgi/PHP5, cgi/PHP5 und suPHP pro Website.

Wir können Apache2 mit mod_php5, mod_fcgid und PHP5 wie folgt installieren:

yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel

Als nächstes öffnen wir /etc/php.ini...

vi /etc/php.ini

... und ändere die Fehlerberichterstattung (so dass keine Hinweise mehr angezeigt werden) und entkommentiere cgi.fix_pathinfo=1:

[...]
;error_reporting = E_ALL & ~E_DEPRECATED
error_reporting = E_ALL & ~E_NOTICE
[...]
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
cgi.fix_pathinfo=1
[...]

Als nächstes installieren wir suPHP (in den Repositories ist ein mod_suphp-Paket verfügbar, aber leider ist es nicht mit ISPConfig kompatibel, daher müssen wir suPHP selbst bauen):

cd /tmp
wget http://suphp.org/download/suphp-0.7.1.tar.gz
tar xvfz suphp-0.7.1.tar.gz
cd suphp-0.7 .1/
./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable- SUPHP_USE_USERGROUP=yes
make
make install

Dann fügen wir das suPHP-Modul zu unserer Apache-Konfiguration hinzu...

vi /etc/httpd/conf.d/suphp.conf
LoadModule suphp_module modules/mod_suphp.so

... und erstellen Sie die Datei /etc/suphp.conf wie folgt:

vi /etc/suphp.conf
[global]
;Path to logfile
logfile=/var/log/httpd/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-suphp="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

Abschließend starten wir Apache neu:

/etc/init.d/httpd restart

15.1 Rubin

Ab Version 3.0.3 hat ISPConfig 3 eingebaute Unterstützung für Ruby. Anstatt CGI/FastCGI zu verwenden, hängt ISPConfig davon ab, dass mod_ruby im Apache des Servers verfügbar ist.

Für CentOS 6.1 ist kein mod_ruby-Paket verfügbar, also müssen wir es selbst kompilieren. Zuerst installieren wir einige Voraussetzungen:

yum install httpd-devel ruby ruby-devel

Als nächstes laden wir mod_ruby herunter und installieren es wie folgt:

cd /tmp
wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
tar zxvf mod_ruby-1.3.0.tar.gz
cd mod_ruby-1.3 .0/
./configure.rb --with-apr-includes=/usr/include/apr-1
make
make install

Schließlich müssen wir das Modul mod_ruby zur Apache-Konfiguration hinzufügen, also erstellen wir die Datei /etc/httpd/conf.d/ruby.conf...

vi /etc/httpd/conf.d/ruby.conf
LoadModule ruby_module modules/mod_ruby.so
RubyAddPath /1.8

... und Apache neu starten:

/etc/init.d/httpd restart

(Wenn Sie die Direktive RubyAddPath /1.8 weglassen, sehen Sie Fehler wie die folgenden im Fehlerprotokoll von Apache, wenn Sie Ruby-Dateien aufrufen:

[Do, 26. Mai 02:05:05 2011] [Fehler] mod_ruby:ruby:0:in `require':keine solche Datei zum Laden -- apache/ruby-run (LoadError)
[Do, 26. Mai 02:05:05 2011] [Fehler] mod_ruby:Apache/ruby-run konnte nicht angefordert werden
[Donnerstag, 26. Mai 02:05:05 2011] [Fehler] mod_ruby:Fehler in Ruby

)

15.2-Python

Um mod_python zu installieren, führen wir einfach ...

aus
yum install mod_python

... und danach Apache neu starten:

/etc/init.d/httpd restart

15.3 WebDAV

WebDAV sollte bereits aktiviert sein, aber um dies zu überprüfen, öffnen Sie /etc/httpd/conf/httpd.conf und stellen Sie sicher, dass die folgenden drei Module aktiv sind:

vi /etc/httpd/conf/httpd.conf
[...]
LoadModule auth_digest_module modules/mod_auth_digest.so
[...]
LoadModule dav_module modules/mod_dav.so
[...]
LoadModule dav_fs_module modules/mod_dav_fs.so
[...]

Wenn Sie /etc/httpd/conf/httpd.conf ändern müssen, vergessen Sie nicht, Apache danach neu zu starten:

/etc/init.d/httpd restart 

16 Installieren Sie PureFTPd

PureFTPd kann mit folgendem Befehl installiert werden:

yum install pure-ftpd

Erstellen Sie dann die Systemstartlinks und starten Sie PureFTPd:

chkconfig --levels 235 pure-ftpd on
/etc/init.d/pure-ftpd start

Jetzt konfigurieren wir PureFTPd so, dass FTP- und TLS-Sitzungen zugelassen werden. FTP ist ein sehr unsicheres Protokoll, da alle Passwörter und alle Daten im Klartext übertragen werden. Durch die Verwendung von TLS kann die gesamte Kommunikation verschlüsselt werden, wodurch FTP viel sicherer wird.

OpenSSL wird von TLS benötigt; Um OpenSSL zu installieren, führen wir einfach Folgendes aus:

yum install openssl

Öffnen Sie /etc/pure-ftpd/pure-ftpd.conf...

vi /etc/pure-ftpd/pure-ftpd.conf

Wenn Sie FTP- und TLS-Sitzungen zulassen möchten, setzen Sie TLS auf 1:

[...]
# This option can accept three values :
# 0 : disable SSL/TLS encryption layer (default).
# 1 : accept both traditional and encrypted sessions.
# 2 : refuse connections that don't use SSL/TLS security mechanisms,
#     including anonymous sessions.
# Do _not_ uncomment this blindly. Be sure that :
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
# 2) A valid certificate is in place,
# 3) Only compatible clients will log in.
TLS                      1
[...]

In order to use TLS, we must create an SSL certificate. I create it in /etc/ssl/private/, therefore I create that directory first:

mkdir -p /etc/ssl/private/

Afterwards, we can generate the SSL certificate as follows:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem 

Country Name (2 letter code) [XX]:<-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) []:<-- Enter your State or Province Name.
Locality Name (eg, city) [Default City]:<-- Enter your City.
Organization Name (eg, company) [Default Company Ltd]:<-- Enter your Organization Name (e.g., the name of your company).
Organizational Unit Name (eg, section) []:<-- Enter your Organizational Unit Name (e.g. "IT Department").
Common Name (eg, your name or your server's hostname) []:<-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com").
Email Address []:<-- Enter your Email Address.

Change the permissions of the SSL certificate:

chmod 600 /etc/ssl/private/pure-ftpd.pem

Finally restart PureFTPd:

 /etc/init.d/pure-ftpd restart

That's it. You can now try to connect using your FTP client; however, you should configure your FTP client to use TLS.

17 Install BIND

We can install BIND as follows:

yum install bind bind-utils

Next open /etc/sysconfig/named...

vi /etc/sysconfig/named

... and make sure that the ROOTDIR=/var/named/chroot line is comment out:

# BIND named process options
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
# Currently, you can use the following options:
#
# ROOTDIR="/var/named/chroot"  --  will run named in a chroot environment.
#                            you must set up the chroot environment
#                            (install the bind-chroot package) before
#                            doing this.
#       NOTE:
#         Those directories are automatically mounted to chroot if they are
#         empty in the ROOTDIR directory. It will simplify maintenance of your
#         chroot environment.
#          - /var/named
#          - /etc/pki/dnssec-keys
#          - /etc/named
#          - /usr/lib64/bind or /usr/lib/bind (architecture dependent)
#
#         Those files are mounted as well if target file doesn't exist in
#         chroot.
#          - /etc/named.conf
#          - /etc/rndc.conf
#          - /etc/rndc.key
#          - /etc/named.rfc1912.zones
#          - /etc/named.dnssec.keys
#          - /etc/named.iscdlv.key
#
#       Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log"
#       line to your /etc/rsyslog.conf file. Otherwise your logging becomes
#       broken when rsyslogd daemon is restarted (due update, for example).
#
# OPTIONS="whatever"     --  These additional options will be passed to named
#                            at startup. Don't add -t here, use ROOTDIR instead.
#
# KEYTAB_FILE="/dir/file"    --  Specify named service keytab file (for GSS-TSIG)
#
# DISABLE_ZONE_CHECKING  -- By default, initscript calls named-checkzone
#                           utility for every zone to ensure all zones are
#                           valid before named starts. If you set this option
#                           to 'yes' then initscript doesn't perform those
#                           checks.

Make a backup of the existing /etc/named.conf file and create a new one as follows:

cp /etc/named.conf /etc/named.conf_bak
cat /dev/null> /etc/named.conf
vi /etc/named.conf

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion no;
        allow-recursion { none; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
        type hint;
        file "named.ca";
};
include "/etc/named.conf.local";

Create the file /etc/named.conf.local that is included at the end of /etc/named.conf (/etc/named.conf.local will later on get populated by ISPConfig if you create DNS zones in ISPConfig):

touch /etc/named.conf.local

Then we create the startup links and start BIND:

chkconfig --levels 235 named on
/etc/init.d/named start

18 Install Vlogger, Webalizer, And AWStats

Vlogger, webalizer, and AWStats can be installed as follows:

yum install webalizer awstats perl-DateTime-Format-HTTP perl-DateTime-Format-Builder

cd /tmp
wget http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz
tar xvfz vlogger-1.3.tar.gz
mv vlogger-1.3/vlogger /usr/sbin/
rm -rf vlogger*

19 Install Jailkit

Jailkit is needed only if you want to chroot SSH users. It can be installed as follows (important:Jailkit must be installed before ISPConfig - it cannot be installed afterwards!):

cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
tar xvfz jailkit-2.14.tar.gz
cd jailkit-2.14
./configure
make
make install
cd ..
rm -rf jailkit-2.14*

20 Install fail2ban

This is optional but recommended, because the ISPConfig monitor tries to show the log:

yum install fail2ban

We must configure fail2ban to log to the log file /var/log/fail2ban.log because this is the log file that is monitored by the ISPConfig Monitor module. Open /etc/fail2ban/fail2ban.conf...

vi /etc/fail2ban/fail2ban.conf

... and comment out the logtarget =SYSLOG line and add logtarget =/var/log/fail2ban.log:

[...]
# Option:  logtarget
# Notes.:  Set the log target. This could be a file, SYSLOG, STDERR or STDOUT.
#          Only one log target can be specified.
# Values:  STDOUT STDERR SYSLOG file  Default:  /var/log/fail2ban.log
#
#logtarget = SYSLOG
logtarget = /var/log/fail2ban.log
[...]

Then create the system startup links for fail2ban and start it:

chkconfig --levels 235 fail2ban on
/etc/init.d/fail2ban start

21 Install rkhunter

rkhunter can be installed as follows:

yum install rkhunter

The Perfect Server - CentOS 6.1 x86_64 With Apache2 [ISPConfig 3] - Page 6

22 Install Mailman

Since version 3.0.4, ISPConfig also allows you to manage (create/modify/delete) Mailman mailing lists. If you want to make use of this feature, install Mailman as follows:

yum install mailman

Before we can start Mailman, a first mailing list called mailman must be created:

/usr/lib/mailman/bin/newlist mailman

[[email protected] tmp]# /usr/lib/mailman/bin/newlist mailman
Enter the email of the person running the list: <-- admin email address, e.g. [email protected]
Initial mailman password: <-- admin password for the mailman list
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## mailman mailing list
mailman:              "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner... <-- ENTER

[[email protected] tmp]#

Open /etc/aliases afterwards...

vi /etc/aliases

... and add the following lines:

[...]
mailman:              "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

Run

newaliases

afterwards and restart Postfix:

/etc/init.d/postfix restart

Now open the Mailman Apache configuration file /etc/httpd/conf.d/mailman.conf...

vi /etc/httpd/conf.d/mailman.conf

... and add the line ScriptAlias /cgi-bin/mailman/ /usr/lib/mailman/cgi-bin/. Comment out Alias /pipermail/ /var/lib/mailman/archives/public/ and add the line Alias /pipermail /var/lib/mailman/archives/public/:

#
#  httpd configuration settings for use with mailman.
#

ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
ScriptAlias /cgi-bin/mailman/ /usr/lib/mailman/cgi-bin/
<Directory /usr/lib/mailman/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>


#Alias /pipermail/ /var/lib/mailman/archives/public/
Alias /pipermail /var/lib/mailman/archives/public/
<Directory /var/lib/mailman/archives/public>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    AddDefaultCharset Off
</Directory>

# Uncomment the following line, to redirect queries to /mailman to the
# listinfo page (recommended).

# RedirectMatch ^/mailman[/]*$ /mailman/listinfo

Restart Apache:

/etc/init.d/httpd restart

Create the system startup links for Mailman and start it:

chkconfig --levels 235 mailman on
/etc/init.d/mailman start

After you have installed ISPConfig 3, you can access Mailman as follows:

You can use the alias /cgi-bin/mailman for all Apache vhosts (please note that suExec and CGI must be disabled for all vhosts from which you want to access Mailman!), which means you can access the Mailman admin interface for a list at http:///cgi-bin/mailman/admin/, and the web page for users of a mailing list can be found at http:///cgi-bin/mailman/listinfo/.

Under http:///pipermail/ you can find the mailing list archives.

23 Install SquirrelMail

To install the SquirrelMail webmail client, run...

yum install squirrelmail

... and restart Apache:

/etc/init.d/httpd restart

Then configure SquirrelMail:

/usr/share/squirrelmail/config/conf.pl

We must tell SquirrelMail that we are using Courier-IMAP/-POP3:

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >> <-- D


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server
    gmail       = IMAP access to Google mail (Gmail) accounts

    quit        = Do not change anything
Command >> <-- courier


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server
    gmail       = IMAP access to Google mail (Gmail) accounts

    quit        = Do not change anything
Command >> courier

              imap_server_type = courier
         default_folder_prefix = INBOX.
                  trash_folder = Trash
                   sent_folder = Sent
                  draft_folder = Drafts
            show_prefix_option = false
          default_sub_of_inbox = false
show_contain_subfolders_option = false
            optional_delimiter = .
                 delete_folder = true

Press enter to continue... <-- press ENTER


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >> <--S


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >> <--Q

One last thing we need to do is modify the file /etc/squirrelmail/config_local.php and comment out the $default_folder_prefix variable - if you don't do this, you will see the following error message in SquirrelMail after you've logged in:Query:CREATE "Sent" Reason Given:Invalid mailbox name.

vi /etc/squirrelmail/config_local.php
<?php

/**
 * Local config overrides.
 *
 * You can override the config.php settings here.
 * Don't do it unless you know what you're doing.
 * Use standard PHP syntax, see config.php for examples.
 *
 * @copyright &copy; 2002-2006 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: config_local.php,v 1.2 2006/07/11 03:33:47 wtogami Exp $
 * @package squirrelmail
 * @subpackage config
 */

//$default_folder_prefix                = '';
?>

Now you can type in http://server1.example.com/webmail or http://192.168.0.100/webmail in your browser to access SquirrelMail.

The Perfect Server - CentOS 6.1 x86_64 With Apache2 [ISPConfig 3] - Page 7

24 Install ISPConfig 3

Download the current ISPConfig 3 version and install it. The ISPConfig installer will configure all services like Postfix, Courier, etc. for you. A manual setup as required for ISPConfig 2 is not necessary anymore.

You now also have the possibility to let the installer create an SSL vhost for the ISPConfig control panel, so that ISPConfig can be accessed using https:// instead of http://. To achieve this, just press ENTER when you see this question:Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]:.

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/

The next step is to run

php -q install.php

This will start the ISPConfig 3 installer:

[[email protected] install]# php -q install.php


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


>> Initial configuration

Operating System: Redhat or compatible, unknown version.

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


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

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

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

MySQL server hostname [localhost]: <-- ENTER

MySQL root username [root]: <-- ENTER

MySQL root password []: <- - yourrootsqlpassword

MySQL database to create [dbispconfig]: <-- ENTER

MySQL charset [utf8]: <-- ENTER

Generating a 2048 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
State or Province Name (full name) []: <-- ENTER
Locality Name (eg, city) [Default City]: <-- ENTER
Organization Name (eg, company) [Default Company Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, your name or your server's hostname) []: <-- ENTER
Email Address []: <-- ENTER
Configuring Jailkit
Configuring SASL
Configuring PAM
Configuring Courier
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring BIND
Configuring Apache
Configuring Vlogger
Configuring Apps vhost
Configuring Bastille Firewall
Configuring Fail2ban
Installing ISPConfig
ISPConfig Port [8080]: <-- ENTER

Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]:<-- 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 wh at 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
State or Province Name (full name) []: <-- ENTER
Locality Name (eg, city) [Default City]: <-- ENTER
Organization Name (eg, company) [Default Company Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, your name or your server's hostname) []: <-- ENTER
Email Address []: <-- ENTER

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: <-- ENTER
An optional company name []: <-- ENTER
writing RSA key
Configuring DBServer
Installing ISPConfig crontab
no crontab for root
no crontab for getmail
Restarting services ...
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]
Stopping saslauthd:                                        [FAILED]
Starting saslauthd:                                        [  OK  ]
Shutting down amavisd: Daemon [1415] terminated by SIGTERM
                                                           [  OK  ]
amavisd stopped
Starting amavisd:                                          [  OK  ]

Stopping clamd.amavisd:                                    [  OK  ]
Starting clamd.amavisd:                                    [  OK  ]
Stopping Courier authentication services: authdaemond
Starting Courier authentication services: authdaemond
Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Starting Courier-IMAP serve r: imap imap-ssl pop3 pop3-ssl
Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
SyntaxError: ('invalid syntax', ('/usr/lib/mailman/Mailman/mm_cfg.py', 76, 27, 'DEFAULT_SERVER_LANGUAGE = \n'))

Traceback (most recent call last):
  File "/usr/lib/mailman/bin/mailmanctl", line 109, in 
    from Mailman import mm_cfg
  File "/usr/lib/mailman/Mailman/mm_cfg.py", line 76
    DEFAULT_SERVER_LANGUAGE =
                             ^
SyntaxError: invalid syntax
Shutting down mailman:                                     [FAILED]
SyntaxError: ('invalid syntax', ('/usr/lib/mailman/Mailman/mm_cfg.py', 76, 27, 'DEF AULT_SERVER_LANGUAGE = \n'))

Traceback (most recent call last):
  File "/usr/lib/mailman/bin/mailmanctl", line 109, in 
    from Mailman import mm_cfg
  File "/usr/lib/mailman/Mailman/mm_cfg.py", line 76
    DEFAULT_SERVER_LANGUAGE =
                             ^
SyntaxError: invalid syntax
Starting mailman:                                          [FAILED]
Stopping httpd:                                            [  OK  ]
[Sun Dec 18 23:47:41 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
Starting httpd:                                            [  OK  ]
Stopping pure-ftpd:                                        [  OK  ]
Starting pure-ftpd:                                        [  OK  ]
Installation completed.
[[email protected] install]#

To fix the Mailman errors you might get during the ISPConfig installation, open /usr/lib/mailman/Mailman/mm_cfg.py...

vi /usr/lib/mailman/Mailman/mm_cfg.py

... and set DEFAULT_SERVER_LANGUAGE ='en':

[...]
#-------------------------------------------------------------
# The default language for this server.
DEFAULT_SERVER_LANGUAGE = 'en'
[...]

Restart Mailman:

/etc/init.d/mailman restart 

Afterwards you can access ISPConfig 3 under http(s)://server1.example.com:8080/ or http(s)://192.168.0.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.

24.1 ISPConfig 3 Manual

In order to learn how to use ISPConfig 3, I strongly recommend to download the ISPConfig 3 Manual.

On about 300 pages, it covers the concept behind ISPConfig (admin, resellers, clients), explains how to install and update ISPConfig 3, includes a reference for all forms and form fields in ISPConfig together with examples of valid inputs, and provides tutorials for the most common tasks in ISPConfig 3. It also lines out how to make your server more secure and comes with a troubleshooting section at the end.

24.2 ISPConfig Monitor App For Android

With the ISPConfig Monitor App, you can check your server status and find out if all services are running as expected. You can check TCP and UDP ports and ping your servers. In addition to that you can use this app to request details from servers that have ISPConfig installed (please note that the minimum installed ISPConfig 3 version with support for the ISPConfig Monitor App is 3.0.3.3! ); these details include everything you know from the Monitor module in the ISPConfig Control Panel (e.g. services, mail and system logs, mail queue, CPU and memory info, disk usage, quota, OS details, RKHunter log, etc.), and of course, as ISPConfig is multiserver-capable, you can check all servers that are controlled from your ISPConfig master server.

For download and usage instructions, please visit http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.

  • CentOS:http://www.centos.org/
  • ISPConfig:http://www.ispconfig.org/

Panels
  1. Der perfekte Server – Fedora 15 x86_64 [ISPConfig 3]

  2. Der perfekte Server – CentOS 5.6 x86_64 [ISPConfig 2]

  3. Der perfekte Server – OpenSUSE 12.1 x86_64 mit Nginx [ISPConfig 3]

  4. Der perfekte Server – OpenSUSE 12.1 x86_64 mit Apache2 [ISPConfig 3]

  5. Der perfekte Server – Ubuntu 11.10 mit Nginx [ISPConfig 3]

Der perfekte Server – OpenSUSE 12.2 x86_64 (Apache2, Dovecot, ISPConfig 3)

Der perfekte Server – CentOS 6.3 x86_64 (nginx, Dovecot, ISPConfig 3)

Der perfekte Server – CentOS 6.3 x86_64 (nginx, Courier, ISPConfig 3)

Der perfekte Server – CentOS 6.3 x86_64 (Apache2, Courier, ISPConfig 3)

Der perfekte Server – CentOS 6.4 x86_64 (nginx, Dovecot, ISPConfig 3)

Der perfekte Server – CentOS 6.4 x86_64 (Apache2, Dovecot, ISPConfig 3)