GNU/Linux >> Tutoriales Linux >  >> Panels >> Panels

El servidor perfecto:Ubuntu 11.10 con Nginx [ISPConfig 3]

El servidor perfecto:Ubuntu 11.10 con Nginx [ISPConfig 3]

Este tutorial muestra cómo preparar un servidor Ubuntu 11.10 (Oneiric Ocelot) con nginx para la instalación de ISPConfig 3 y cómo instalar ISPConfig 3. Desde la versión 3.0.4, ISPConfig viene con soporte completo para el servidor web nginx además de Apache , y este tutorial cubre la configuración de un servidor que usa nginx en lugar de Apache. ISPConfig 3 es un panel de control de alojamiento web que le permite configurar los siguientes servicios a través de un navegador web:servidor web nginx y Apache, servidor de correo Postfix, servidor de nombres MySQL, BIND o MyDNS, PureFTPd, SpamAssassin, ClamAV y muchos más.

Si desea usar nginx en lugar de Apache con ISPConfig, tenga en cuenta que su versión de nginx debe ser al menos 0.8.21 y también debe instalar PHP-FPM. Para compatibilidad con CGI/Perl, debe utilizar fcgiwrap. Todo esto está cubierto por este tutorial.

Tenga en cuenta que no puede usar este tutorial para Debian Squeeze porque Squeeze viene con una versión anterior de nginx (0.7.67.) ¡y no tiene un paquete PHP-FPM!

Tenga en cuenta que esta configuración no funciona para ISPConfig 2 ! ¡Es válido solo para ISPConfig 3!

¡No emito ninguna garantía de que esto funcione para usted!

Manual de ISPConfig 3

Para aprender a usar ISPConfig 3, recomiendo descargar el Manual de ISPConfig 3.

En aproximadamente 300 páginas, cubre el concepto detrás de ISPConfig (administrador, revendedores, clientes), explica cómo instalar y actualizar ISPConfig 3, incluye una referencia para todos los formularios y campos de formulario en ISPConfig junto con ejemplos de entradas válidas y proporciona tutoriales para las tareas más comunes en ISPConfig 3. También explica cómo hacer que su servidor sea más seguro y viene con una sección de solución de problemas al final.

Aplicación ISPConfig Monitor para Android

Con la aplicación ISPConfig Monitor, puede verificar el estado de su servidor y averiguar si todos los servicios funcionan como se espera. Puede verificar los puertos TCP y UDP y hacer ping a sus servidores. Además de eso, puede usar esta aplicación para solicitar detalles de los servidores que tienen instalado ISPConfig (tenga en cuenta que la versión mínima instalada de ISPConfig 3 compatible con la aplicación ISPConfig Monitor es 3.0.3.3! ); estos detalles incluyen todo lo que sabe del módulo Monitor en el Panel de control de ISPConfig (por ejemplo, servicios, registros de correo y del sistema, cola de correo, información de CPU y memoria, uso del disco, cuota, detalles del sistema operativo, registro de RKHunter, etc.), y por supuesto , como ISPConfig tiene capacidad para varios servidores, puede verificar todos los servidores que están controlados desde su servidor maestro ISPConfig.

Para obtener instrucciones de uso y descarga, visite http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.

1 Requisitos

Para instalar dicho sistema, necesitará lo siguiente:

  • el CD del servidor Ubuntu 11.10, disponible aquí:http://releases.ubuntu.com/releases/11.10/ubuntu-11.10-server-i386.iso (i386) o http://releases.ubuntu.com/releases /11.10/ubuntu-11.10-servidor-amd64.iso (x86_64)
  • una conexión rápida a Internet.

2 Nota Preliminar

En este tutorial utilizo el nombre de host server1.example.com con la dirección IP 192.168.0.100 y la puerta de enlace 192.168.0.1. Estas configuraciones pueden diferir para usted, por lo que debe reemplazarlas cuando corresponda.

3 El Sistema Base

Inserte su CD de instalación de Ubuntu en su sistema y arranque desde él. Seleccione su idioma:

Luego seleccione Instalar Servidor Ubuntu:

Elige tu idioma de nuevo (?):

Luego seleccione su ubicación:

Si ha seleccionado una combinación poco común de idioma y ubicación (como inglés como idioma y Alemania como ubicación, como en mi caso), el instalador podría indicarle que no hay una configuración regional definida para esta combinación; en este caso, debe seleccionar la configuración regional manualmente. Selecciono en_US.UTF-8 aquí:

Elija una distribución de teclado (se le pedirá que presione algunas teclas y el instalador intentará detectar su distribución de teclado según las teclas que presionó):

El instalador comprueba el CD de instalación, su hardware y configura la red con DHCP si hay un servidor DHCP en la red:

El servidor perfecto - Ubuntu 11.10 con Nginx [ISPConfig 3] - Página 2

4 Obtener privilegios de root

Después del reinicio, puede iniciar sesión con su nombre de usuario creado previamente (por ejemplo, administrador). Debido a que debemos ejecutar todos los pasos de este tutorial con privilegios de root, podemos anteponer todos los comandos en este tutorial con la cadena sudo, o convertirnos en root ahora mismo escribiendo

sudo su 

(También puede habilitar el inicio de sesión raíz ejecutando

sudo passwd root

y dando a root una contraseña. Luego puede iniciar sesión directamente como root, pero los desarrolladores y la comunidad de Ubuntu lo desaprueban por varias razones. Consulte http://ubuntuforums.org/showthread.php?t=765414.)

5 Instalar el servidor SSH (opcional)

Si no instaló el servidor OpenSSH durante la instalación del sistema, puede hacerlo ahora:

apt-get install ssh openssh-server

A partir de ahora, puede usar un cliente SSH como PuTTY y conectarse desde su estación de trabajo a su servidor Ubuntu 11.10 y seguir los pasos restantes de este tutorial.

6 Instalar vim-nox (opcional)

Usaré vi como mi editor de texto en este tutorial. El programa vi predeterminado tiene un comportamiento extraño en Ubuntu y Debian; para arreglar esto, instalamos vim-nox:

apt-get install vim-nox

(No tienes que hacer esto si usas un editor de texto diferente como joe o nano).

7 Configurar la red

Debido a que el instalador de Ubuntu ha configurado nuestro sistema para obtener su configuración de red a través de DHCP, debemos cambiar eso ahora porque un servidor debe tener una dirección IP estática. Edite /etc/network/interfaces y ajústelo a sus necesidades (en este ejemplo de configuración usaré la dirección IP 192.168.0.100 ):

vi /etc/network/interfaces

Luego reinicie su red:

/etc/init.d/networking restart

Luego edite /etc/hosts. Haz que se vea así:

vi /etc/hosts
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

Ahora corre

echo server1.example.com> /etc/hostname
/etc/init.d/hostname restart

Luego, corre

nombre de host
nombre de host -f

Ambos deberían mostrar server1.example.com ahora.

8 Edite /etc/apt/sources.list y actualice su instalación de Linux

Edite /etc/apt/sources.list. Comente o elimine el CD de instalación del archivo y asegúrese de que los repositorios Universe y Multiverse estén habilitados. Debería verse así:

vi /etc/apt/sources.list
127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Entonces corre

apt-get update

para actualizar la base de datos de paquetes apt y

apt-get upgrade

para instalar las últimas actualizaciones (si las hay). Si ve que se instala un nuevo kernel como parte de las actualizaciones, debe reiniciar el sistema después:

reboot 

9 Cambiar el shell predeterminado

/bin/sh es un enlace simbólico a /bin/dash, sin embargo, necesitamos /bin/bash, no /bin/dash. Por lo tanto hacemos esto:

dpkg-reconfigure dash

¿Usar guión como shell del sistema predeterminado (/bin/sh)? <-- No

Si no hace esto, la instalación de ISPConfig fallará.

10 Deshabilitar AppArmor

AppArmor es una extensión de seguridad (similar a SELinux) que debería proporcionar seguridad extendida. En mi opinión, no lo necesitas para configurar un sistema seguro, y suele causar más problemas que ventajas (piensa en ello después de haber realizado una semana de resolución de problemas porque algún servicio no estaba funcionando como se esperaba, y luego descubra que todo estaba bien, solo AppArmor estaba causando el problema). Por lo tanto, lo deshabilito (esto es obligatorio si desea instalar ISPConfig más adelante).

Podemos desactivarlo así:

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
apt-get remove apparmor apparmor-utils

11 Sincronizar el reloj del sistema

Es una buena idea sincronizar el reloj del sistema con un NTP (n red t tiempo p rotocol) servidor a través de Internet. Simplemente ejecute

apt-get install ntp ntpdate

y la hora de su sistema siempre estará sincronizada.

El servidor perfecto - Ubuntu 11.10 con Nginx [ISPConfig 3] - Página 4

12 Instalar Postfix, Courier, Saslauthd, MySQL, rkhunter, binutils

Podemos instalar Postfix, Courier, Saslauthd, MySQL, rkhunter y binutils con un solo comando:

apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl getmail4 rkhunter binutils maildrop

Se le harán las siguientes preguntas:

Nueva contraseña para el usuario "root" de MySQL:<-- yourrootsqlpassword
Repetir la contraseña para el usuario "root" de MySQL:<-- yourrootsqlpassword
¿Crear directorios para administración basada en web? <-- No
Tipo general de configuración de correo:<-- Sitio de Internet
Nombre de correo del sistema:<-- server1.example.com
Se requiere certificado SSL <-- Ok

Si descubre (luego de haber configurado su primera cuenta de correo electrónico en ISPConfig) que no puede enviar correos electrónicos y obtiene el siguiente error en /var/log/mail.log...

 SASL LOGIN authentication failed: no mechanism available 

... vaya a Ubuntu 11.10 + saslauthd:la autenticación SASL PLAIN falló:no hay ningún mecanismo disponible para aprender a resolver el problema.

Queremos que MySQL escuche en todas las interfaces, no solo en localhost, por lo tanto, editamos /etc/mysql/my.cnf y comentamos la línea bind-address =127.0.0.1:

vi /etc/mysql/my.cnf
#

# deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/main/binary-i386/
# deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/restricted/binary-i386/
# deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ oneiric main restricted

#deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/main/binary-i386/
#deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/restricted/binary-i386/
#deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ oneiric main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ oneiric main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ oneiric universe
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric universe
deb http://de.archive.ubuntu.com/ubuntu/ oneiric-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://de.archive.ubuntu.com/ubuntu/ oneiric multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric multiverse
deb http://de.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu oneiric-security main restricted
deb-src http://security.ubuntu.com/ubuntu oneiric-security main restricted
deb http://security.ubuntu.com/ubuntu oneiric-security universe
deb-src http://security.ubuntu.com/ubuntu oneiric-security universe
deb http://security.ubuntu.com/ubuntu oneiric-security multiverse
deb-src http://security.ubuntu.com/ubuntu oneiric-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu oneiric partner
# deb-src http://archive.canonical.com/ubuntu oneiric partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu oneiric main
# deb-src http://extras.ubuntu.com/ubuntu oneiric main

Luego reiniciamos MySQL:

/etc/init.d/mysql restart

Ahora verifique que la red esté habilitada. Ejecutar

netstat -tap | grep mysql

La salida debería verse así:

[email protected]:~# netstat -tap | grep mysql
tcp        0      0 *:mysql                 *:*                     ESCUCHA      22355/mysqld
[email protected]:~#

Durante la instalación, los certificados SSL para IMAP-SSL y POP3-SSL se crean con el nombre de host localhost. Para cambiar esto al nombre de host correcto (server1.example.com en este tutorial), elimine los certificados...

cd /etc/courier
rm -f /etc/courier/imapd.pem
rm -f /etc/courier/pop3d.pem

... y modifique los siguientes dos archivos; reemplace CN=localhost con CN=server1.example.com (también puede modificar los otros valores, si es necesario):

vi /etc/courier/imapd.cnf
[...]
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           = 127.0.0.1
[...]
vi /etc/courier/pop3d.cnf
[...]
CN=server1.example.com
[...]

Luego vuelva a crear los certificados...

mkimapdcert
mkpop3dcert

... y reinicie Courier-IMAP-SSL y Courier-POP3-SSL:

/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop-ssl restart

13 Instale Amavisd-new, SpamAssassin y Clamav

Para instalar amavisd-new, SpamAssassin y ClamAV, ejecutamos

apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

La configuración de ISPConfig 3 usa amavisd que carga la biblioteca de filtros SpamAssassin internamente, por lo que podemos detener SpamAssassin para liberar RAM:

/etc/init.d/spamassassin stop
update-rc.d -f spamassassin remove

14 Instalar Nginx, PHP5 (PHP-FPM) y Fcgiwrap

Nginx está disponible como paquete para Ubuntu que podemos instalar de la siguiente manera:

apt-get install nginx

Si Apache2 ya está instalado en el sistema, deténgalo ahora...

/etc/init.d/apache2 stop

... y elimine los enlaces de inicio del sistema de Apache:

insserv -r apache2

Inicie nginx después:

/etc/init.d/nginx start

(Si tanto Apache2 como nginx están instalados, el instalador de ISPConfig 3 le preguntará cuál desea usar; responda nginx en este caso. Si solo está instalado uno de estos, ISPConfig realizará la configuración necesaria automáticamente).

Podemos hacer que PHP5 funcione en nginx a través de PHP-FPM (PHP-FPM (FastCGI Process Manager) es una implementación alternativa de PHP FastCGI con algunas funciones adicionales útiles para sitios de cualquier tamaño, especialmente los sitios más concurridos) que instalamos de la siguiente manera:

apt-get install php5-fpm 

PHP-FPM es un proceso daemon (con el script de inicio /etc/init.d/php5-fpm) que ejecuta un servidor FastCGI en el puerto 9000.

Para obtener soporte de MySQL en PHP, podemos instalar el paquete php5-mysql. Es una buena idea instalar algunos otros módulos de PHP5, ya que podría necesitarlos para sus aplicaciones. Puede buscar módulos PHP5 disponibles como este:

apt-cache search php5

Elige los que necesites e instálalos así:

apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

APC es un caché de código de operación de PHP gratuito y abierto para almacenar en caché y optimizar el código intermedio de PHP. Es similar a otros cachés de código de operación de PHP, como eAccelerator y XCache. Se recomienda encarecidamente tener uno de estos instalados para acelerar su página PHP.

APC se puede instalar de la siguiente manera:

apt-get install php-apc

Ahora reinicie PHP-FPM:

/etc/init.d/php5-fpm restart

Para obtener compatibilidad con CGI en nginx, instalamos Fcgiwrap.

Fcgiwrap es un contenedor CGI que debería funcionar también para secuencias de comandos CGI complejas y se puede usar para entornos de alojamiento compartido porque permite que cada host virtual use su propio directorio cgi-bin.

Instale el paquete fcgiwrap:

apt-get install fcgiwrap 

Después de la instalación, el demonio fcgiwrap ya debería estar iniciado; su zócalo es /var/run/fcgiwrap.socket. Si no se está ejecutando, puede usar el script /etc/init.d/fcgiwrap para iniciarlo.

¡Eso es todo! Ahora, cuando cree un vhost nginx, ISPConfig se encargará de la configuración correcta del vhost.

14.1 Instalar phpMyAdmin

Instale phpMyAdmin de la siguiente manera:

apt-get install phpmyadmin

Verá las siguientes preguntas:

Servidor web para reconfigurar automáticamente:<-- seleccione ninguno (porque solo apache2 y lighttpd están disponibles como opciones)
¿Configurar la base de datos para phpmyadmin con dbconfig-common? <-- No

Ahora puede encontrar phpMyAdmin en el directorio /usr/share/phpmyadmin/.

Después de haber instalado ISPConfig 3, puede acceder a phpMyAdmin de la siguiente manera:

El vhost de aplicaciones ISPConfig en el puerto 8081 para nginx viene con una configuración de phpMyAdmin, por lo que puede usar http://server1.example.com:8081/phpmyadmin o http://server1.example.com:8081/phpMyAdmin para acceder a phpMyAdmin.

Si desea usar un alias /phpmyadmin o /phpMyAdmin que pueda usar desde sus sitios web, esto es un poco más complicado que para Apache porque nginx no tiene alias globales (es decir, alias que se pueden definir para todos los vhosts). Por lo tanto, debe definir estos alias para cada uno vhost desde el que desea acceder a phpMyAdmin.

Para hacer esto, pegue lo siguiente en el campo Directivas nginx en la pestaña Opciones del sitio web en ISPConfig:

[...]
CN=server1.example.com
[...]

Si usa https en lugar de http para su host virtual, debe agregar la línea fastcgi_param HTTPS; a su configuración de phpMyAdmin así:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

Si usa tanto http como https para su host virtual, debe agregar la siguiente sección a la sección http {} en /etc/nginx/nginx.conf (antes de cualquier línea de inclusión) que determina si el visitante usa http o https y establece la variable $fastcgi_https (que usaremos en nuestra configuración de phpMyAdmin) en consecuencia:

vi /etc/nginx/nginx.conf
        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_param HTTPS on; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

No olvides recargar nginx después:

/etc/init.d/nginx reload 

Luego vaya al campo Directivas nginx nuevamente, y en lugar de fastcgi_param HTTPS en; agregas la línea fastcgi_param HTTPS $fastcgi_https; para que pueda usar phpMyAdmin para solicitudes http y https:

[...]
http {
[...]
        ## Detect when HTTPS is used
        map $scheme $fastcgi_https {
          default off;
          https on;
        }
[...]
}
[...]

15 Instalar Mailman

Desde la versión 3.0.4, ISPConfig también le permite administrar (crear/modificar/eliminar) listas de correo de Mailman. Si desea utilizar esta función, instale Mailman de la siguiente manera:

apt-get install mailman

Antes de que podamos iniciar Mailman, se debe crear una primera lista de correo llamada mailman:

newlist mailman

[email protected]:~# newlist mailman
Ingrese el correo electrónico de la persona que ejecuta la lista: <-- dirección de correo electrónico del administrador, por ej. [email protected]
Contraseña inicial del cartero: <-- contraseña de administrador para la lista de carteros
Para terminar de crear tu lista de correo, debes editar tu archivo /etc/aliases (o
equivalente) agregando las siguientes líneas y posiblemente ejecutando el programa
`newaliases':

## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman -leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-propietario:        "|/var/lib/mailman/mail/mailman propietario mailman"
mailman-request:      " |/var/lib/mailman/mail/mailman solicitar mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailma n-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Pulse enter para notificar al propietario del mailman... <-- ENTRAR

ejemplo@ unixlinux.online:~#

Abra /etc/aliases luego...

vi /etc/aliases

... y agregue las siguientes líneas:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_param HTTPS $fastcgi_https; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

Ejecutar

newaliases

después y reinicie Postfix:

/etc/init.d/postfix restart

Luego inicie el demonio Mailman:

/etc/init.d/mailman start

Después de haber instalado ISPConfig 3, puede acceder a Mailman de la siguiente manera:

El vhost de aplicaciones ISPConfig en el puerto 8081 para nginx viene con una configuración de Mailman, por lo que puede usar http://server1.example.com:8081/cgi-bin/mailman/admin/ o http://server1.example .com:8081/cgi-bin/mailman/listinfo/ para acceder a Mailman.

Si desea usar Mailman desde sus sitios web, esto es un poco más complicado que para Apache porque nginx no tiene alias globales (es decir, alias que se pueden definir para todos los hosts virtuales). Por lo tanto, debe definir estos alias para cada uno vhost desde el que desea acceder a Mailman.

Para hacer esto, pegue lo siguiente en el campo Directivas nginx en la pestaña Opciones del sitio web en ISPConfig:

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

Esto define el alias /cgi-bin/mailman/ para su host virtual, lo que significa que puede acceder a la interfaz de administración de Mailman para obtener una lista en http:///cgi-bin/mailman/admin/, y el La página web para usuarios de una lista de correo se puede encontrar en http:///cgi-bin/mailman/listinfo/.

En http:///pipermail puede encontrar los archivos de la lista de correo.

El servidor perfecto - Ubuntu 11.10 con Nginx [ISPConfig 3] - Página 5

16 Instalar PureFTPd y cuota

PureFTPd y la cuota se pueden instalar con el siguiente comando:

apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool

Edite el archivo /etc/default/pure-ftpd-common...

vi /etc/default/pure-ftpd-common

... y asegúrese de que el modo de inicio esté configurado como independiente y establezca VIRTUALCHROOT=true:

        location /cgi-bin/mailman {
               root /usr/lib/;
               fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
               include /etc/nginx/fastcgi_params;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_path_info;
               fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
               fastcgi_intercept_errors on;
               fastcgi_pass unix:/var/run/fcgiwrap.socket;
        }
        location /images/mailman {
               alias /usr/share/images/mailman;
        }
        location /pipermail {
               alias /var/lib/mailman/archives/public;
               autoindex on;
        }

Ahora configuramos PureFTPd para permitir sesiones FTP y TLS. FTP es un protocolo muy inseguro porque todas las contraseñas y todos los datos se transfieren en texto claro. Mediante el uso de TLS, toda la comunicación se puede cifrar, lo que hace que el FTP sea mucho más seguro.

Si desea permitir sesiones FTP y TLS, ejecute

echo 1 > /etc/pure-ftpd/conf/TLS

Para usar TLS, debemos crear un certificado SSL. Lo creo en /etc/ssl/private/, por lo tanto, primero creo ese directorio:

mkdir -p /etc/ssl/private/

Posteriormente, podemos generar el certificado SSL de la siguiente manera:

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

Nombre del país (código de 2 letras) [AU]:<-- Ingrese el nombre de su país (por ejemplo, "DE").
Nombre del estado o provincia (nombre completo) [Algún estado]:<-- Ingrese su estado o Nombre de la provincia.
Nombre de la localidad (p. ej., ciudad) []:<-- Ingrese su ciudad.
Nombre de la organización (p. ej., empresa) [Internet Widgits Pty Ltd]:<-- Ingrese el nombre de su organización (p. ej., el nombre de su empresa).
Nombre de la unidad organizativa (p. ej., sección) []:<-- Ingrese el nombre de su unidad organizativa (p. ej., "Departamento de TI").
Nombre común (p. ej., SU nombre) []:<-- Ingrese el nombre de dominio completo del sistema (por ejemplo, "servidor1.ejemplo.com").
Dirección de correo electrónico []:<-- Ingrese su dirección de correo electrónico.

Cambiar los permisos del certificado SSL:

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

Luego reinicie PureFTPd:

/etc/init.d/pure-ftpd-mysql restart

Edite /etc/fstab. El mío se ve así (agregué ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 a la partición con el punto de montaje /):

vi /etc/fstab
[...]
STANDALONE_OR_INETD=standalone
[...]
VIRTUALCHROOT=true
[...]

Para habilitar la cuota, ejecute estos comandos:

mount -o remount /

control de cuota -avugm
cuota -avug

17 Instalar servidor BIND DNS

BIND se puede instalar de la siguiente manera:

apt-get install bind9 dnsutils

18 Instalar Vlogger, Webalizer y AWstats

Vlogger, webalizer y AWstats se pueden instalar de la siguiente manera:

apt-get install vlogger webalizer awstats geoip-database

Abra /etc/cron.d/awstats luego...

vi /etc/cron.d/awstats

... y comente ambos trabajos cron en ese archivo:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/server1-root /               ext4    errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0       1
# /boot was on /dev/sda1 during installation
UUID=6fbce377-c3d6-4eb3-8299-88797d4ad18d /boot           ext2    defaults        0       2
/dev/mapper/server1-swap_1 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

19 Instalar Jailkit

Solo se necesita Jailkit si desea chrootear a los usuarios de SSH. Se puede instalar de la siguiente manera (importante:Jailkit se debe instalar antes de ISPConfig - ¡no se puede instalar después!):

apt-get install build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold

cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
tar xvfz jailkit-2.14.tar.gz
cd jailkit-2.14
./debian/reglas binarias

Ahora puede instalar el paquete Jailkit .deb de la siguiente manera:

cd ..
dpkg -i jailkit_2.14-1_*.deb
rm -rf jailkit-2.14*

20 Instalar fail2ban

Esto es opcional pero recomendado, porque el monitor ISPConfig intenta mostrar el registro fail2ban:

apt-get install fail2ban

Para hacer que fail2ban monitoree PureFTPd, SASL y Courier, cree el archivo /etc/fail2ban/jail.local:

vi /etc/fail2ban/jail.local
#*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

# Generate static reports:
#10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

Luego cree los siguientes cinco archivos de filtro:

vi /etc/fail2ban/filter.d/pureftpd.conf
[pureftpd]

enabled  = true
port     = ftp
filter   = pureftpd
logpath  = /var/log/syslog
maxretry = 3


[sasl]

enabled  = true
port     = smtp
filter   = sasl
logpath  = /var/log/mail.log
maxretry = 5


[courierpop3]

enabled  = true
port     = pop3
filter   = courierpop3
logpath  = /var/log/mail.log
maxretry = 5


[courierpop3s]

enabled  = true
port     = pop3s
filter   = courierpop3s
logpath  = /var/log/mail.log
maxretry = 5


[courierimap]

enabled  = true
port     = imap2
filter   = courierimap
logpath  = /var/log/mail.log
maxretry = 5


[courierimaps]

enabled  = true
port     = imaps
filter   = courierimaps
logpath  = /var/log/mail.log
maxretry = 5
vi /etc/fail2ban/filter.d/courierpop3.conf
[Definition]
failregex = .*pure-ftpd: \(.*@<HOST>\) \[WARNING\] Authentication failed for user.*
ignoreregex =
vi /etc/fail2ban/filter.d/courierpop3s.conf
# Fail2Ban configuration file
#
# $Revision: 100 $
#

[Definition]

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>\S+)
# Values:  TEXT
#
failregex = pop3d: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =
vi /etc/fail2ban/filter.d/courierimap.conf
# Fail2Ban configuration file
#
# $Revision: 100 $
#

[Definition]

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>\S+)
# Values:  TEXT
#
failregex = pop3d-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =
vi /etc/fail2ban/filter.d/courierimaps.conf
# Fail2Ban configuration file
#
# $Revision: 100 $
#

[Definition]

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>\S+)
# Values:  TEXT
#
failregex = imapd: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =

Reinicie fail2ban después:

/etc/init.d/fail2ban restart 

El servidor perfecto - Ubuntu 11.10 con Nginx [ISPConfig 3] - Página 6

21 Instalar SquirrelMail

Para instalar el cliente de correo web SquirrelMail, ejecute

apt-get install squirrelmail

Luego configure SquirrelMail:

squirrelmail-configure

Debemos decirle a SquirrelMail que estamos usando Courier-IMAP/-POP3:

Configuración de SquirrelMail: Leer: config.php (1.4.0)
--------------------------------- ------------------------
Menú principal --
1. Preferencias de la organización
2. Configuración del servidor
3. Valores predeterminados de carpeta
4. Opciones generales
5. Temas
6. Libretas de direcciones
7. Mensaje del día (MOTD)
8. Complementos
9. Base de datos
10. Idiomas

D. Establecer configuraciones predefinidas para servidores IMAP específicos

C   Activar color 
S   Guardar datos
Q   Salir

Comando >> <-- D


Configuración de SquirrelMail: Leer: config.php
--------------------------- ------------------------------
Mientras construimos SquirrelMail, hemos descubierto algunas
preferencias que funcionan mejor con algunos servidores que no funcionan
tan bien con otros. Si selecciona su servidor IMAP, esta opción
establecerá algunas configuraciones predefinidas para ese servidor.

Tenga en cuenta que aún tendrá que revisar y asegurarse
de que todo es correcto. Esto no lo cambia todo. Hay
solo algunas configuraciones que esto cambiará.

Por favor, seleccione su servidor IMAP:
    bincimap    = Servidor BInc IMAP
    courier     = Servidor IMAP de Courier
Cyrus =cyrus imap servidor
dovecot =dovecot seguro imap servidor
intercambio =microsoft intercambio imap servidor
hmailserver =hmailserver
macOSX =Mac OS X Mailserver
Mercury32 =Mercury /32
    uw          = Servidor IMAP de la Universidad de Washington
    gmail       = Acceso IMAP a cuentas de Google mail (Gmail)

    quit        = No cambiar nada
Comando >> <-- courier


Configuración de SquirrelMail : Leer: config.php
-------------- ----------------------------------
Mientras construíamos SquirrelMail, hemos descubierto algunos
preferencias que funcionan mejor con algunos servidores que no funcionan
tan bien con otros. Si selecciona su servidor IMAP, esta opción
establecerá algunas configuraciones predefinidas para ese servidor.

Tenga en cuenta que aún tendrá que revisar y asegurarse
de que todo es correcto. Esto no lo cambia todo. Hay
solo algunas configuraciones que esto cambiará.

Por favor, seleccione su servidor IMAP:
    bincimap    = Servidor BInc IMAP
    courier     = Servidor IMAP de Courier
    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

    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... <-- 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 on
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 on
S   Save data
Q   Quit

Command >> S

Data saved in config.php
Press enter to continue... <-- 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 on
S   Save data
Q   Quit

Command >> <-- Q

You can now find SquirrelMail in the /usr/share/squirrelmail/ directory.

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

The ISPConfig apps vhost on port 8081 for nginx comes with a SquirrelMail configuration, so you can use http://server1.example.com:8081/squirrelmail or http://server1.example.com:8081/webmail to access SquirrelMail.

If you want to use a /webmail or /squirrelmail alias that you can use from your web sites, this is a bit more complicated than for Apache because nginx does not have global aliases (i.e., aliases that can be defined for all vhosts). Por lo tanto, debe definir estos alias para cada uno vhost from which you want to access SquirrelMail.

Para hacer esto, pegue lo siguiente en el campo Directivas nginx en la pestaña Opciones del sitio web en ISPConfig:

# Fail2Ban configuration file
#
# $Revision: 100 $
#

[Definition]

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>\S+)
# Values:  TEXT
#
failregex = imapd-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =

Si usa https en lugar de http para su host virtual, debe agregar la línea fastcgi_param HTTPS; to your SquirrelMail configuration like this:

        location /squirrelmail {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/squirrelmail/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /webmail {
               rewrite ^/* /squirrelmail last;
        }

If you use both http and https for your vhost, you need to add the following section to the http {} section in /etc/nginx/nginx.conf (before any include lines) which determines if the visitor uses http or https and sets the $fastcgi_https variable (which we will use in our SquirrelMail configuration) accordingly:

vi /etc/nginx/nginx.conf
        location /squirrelmail {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/squirrelmail/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_param HTTPS on; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /webmail {
               rewrite ^/* /squirrelmail last;
        }

No olvides recargar nginx después:

/etc/init.d/nginx reload 

Luego vaya al campo Directivas nginx nuevamente, y en lugar de fastcgi_param HTTPS en; agregas la línea fastcgi_param HTTPS $fastcgi_https; so that you can use SquirrelMail for both http and https requests:

[...]
http {
[...]
        ## Detect when HTTPS is used
        map $scheme $fastcgi_https {
          default off;
          https on;
        }
[...]
}
[...]

The Perfect Server - Ubuntu 11.10 With Nginx [ISPConfig 3] - Page 7

22 Install ISPConfig 3

Before you start the ISPConfig installation, make sure that Apache is stopped (if it is installed - it is possible that some of your installed packages have installed Apache as a dependency without you knowing). If Apache2 is already installed on the system, stop it now...

/etc/init.d/apache2 stop

... and remove Apache's system startup links:

insserv -r apache2

Make sure that nginx is running:

/etc/init.d/nginx restart

(If you have both Apache and nginx installed, the installer asks you which one you want to use:Apache and nginx detected. Select server to use for ISPConfig:(apache,nginx) [apache]:

Type nginx. If only Apache or nginx are installed, this is automatically detected by the installer, and no question is asked.)

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. The installer will configure all services like Postfix, SASL, Courier, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not necessary.

[email protected]:/tmp/ispconfig3_install/install# php -q install.php


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


>> Initial configuration

Operating System: Debian 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

Apache and nginx detected. Select server to use for ISPConfig: (apache,nginx) [apache]: <-- nginx

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) [AU]: <-- ENTER
State or Province Name (full name) [Some-State]: <-- ENTER
Locality Name (eg, city) []: <-- ENTER
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, YOUR name) []: <-- ENTER
Email Address []: <-- ENTER
Configuring Jailkit
Configuring SASL
Configuring PAM
Configuring Courier
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring BIND
Configuring nginx
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 what is called a Distinguished Name or a DN.
There are quite a few fi elds 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
State or Province Name (full name) [Some-State]: <-- ENTER
Locality Name (eg, city) []: <-- ENTER
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, YOUR name) []: <-- 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 ...
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
mysql stop/waiting
mysql start/running, process 2463
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
 * Stopping SASL Authentication Daemon saslauthd
   ...done.
 * Starting SASL Authentication Daemon saslauthd
   ...done.
Stopping amavisd: amavisd-new.
Starting amavisd: amavisd-new.
 * Stopping ClamAV daemon clamd
   ...done.
 * Starting ClamAV daemon clamd
Bytecode: Security mode set to "TrustSigned".
   ...done.
 * Stopping Courier authentication services authdaemond
   ...done.
 * Starting Courier authentication services authdaemond
   ...done.
 * Stopping Courier IMAP server imapd
   ...done.
 * Starting Courier IMAP server imapd
   ...done.
 * Stopping Courier IMAP-SSL server imapd-ssl
   ...done.
 * Starting Courier IMAP-SSL se rver imapd-ssl
   ...done.
 * Stopping Courier POP3 server...
   ...done.
 * Starting Courier POP3 server...
   ...done.
 * Stopping Courier POP3-SSL server...
   ...done.
 * Starting Courier POP3-SSL server...
   ...done.
 * Restarting Mailman master qrunner mailmanctl
 * Waiting...
   ...fail!
The master qrunner lock could not be acquired because it appears as if another
master qrunner is already running.

   ...done.
 * Reloading PHP5 FastCGI Process Manager php5-fpm
   ...done.
Reloading nginx configuration: nginx.
Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -8 UTF-8 -O clf:/var/log/pure-ftpd/transfer.log -D -H -b -A -E -u 1000 -Y 1 -B
Installation completed.
You have mail in /var/mail/root
[email protected]:/tmp/ispconfig3_install/install#

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

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]:.

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):

(If you get a 502 Bad Gateway error, just restart PHP-FPM and try again:

/etc/init.d/php5-fpm restart

)

The system is now ready to be used.

22.1 ISPConfig 3 Manual

Para aprender a usar ISPConfig 3, recomiendo descargar el Manual de ISPConfig 3.

En aproximadamente 300 páginas, cubre el concepto detrás de ISPConfig (administrador, revendedores, clientes), explica cómo instalar y actualizar ISPConfig 3, incluye una referencia para todos los formularios y campos de formulario en ISPConfig junto con ejemplos de entradas válidas y proporciona tutoriales para las tareas más comunes en ISPConfig 3. También explica cómo hacer que su servidor sea más seguro y viene con una sección de solución de problemas al final.

22.2 ISPConfig Monitor App For Android

Con la aplicación ISPConfig Monitor, puede verificar el estado de su servidor y averiguar si todos los servicios funcionan como se espera. Puede verificar los puertos TCP y UDP y hacer ping a sus servidores. Además de eso, puede usar esta aplicación para solicitar detalles de los servidores que tienen instalado ISPConfig (tenga en cuenta que la versión mínima instalada de ISPConfig 3 compatible con la aplicación ISPConfig Monitor es 3.0.3.3! ); estos detalles incluyen todo lo que sabe del módulo Monitor en el Panel de control de ISPConfig (por ejemplo, servicios, registros de correo y del sistema, cola de correo, información de CPU y memoria, uso del disco, cuota, detalles del sistema operativo, registro de RKHunter, etc.), y por supuesto , como ISPConfig tiene capacidad para varios servidores, puede verificar todos los servidores que están controlados desde su servidor maestro ISPConfig.

Para obtener instrucciones de uso y descarga, visite http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.

23 Additional Notes

23.1 OpenVZ

If the Ubuntu 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

  • Ubuntu:http://www.ubuntu.com/
  • ISPConfig:http://www.ispconfig.org/

About The Author

Falko Timme is the owner of Timme Hosting (ultra-fast nginx web hosting). He is the lead maintainer of HowtoForge (since 2005) and one of the core developers of ISPConfig (since 2000). He has also contributed to the O'Reilly book "Linux System Administration".


Panels
  1. El servidor perfecto - Ubuntu 14.10 (nginx, BIND, Dovecot, ISPConfig 3)

  2. El servidor perfecto - Fedora 15 x86_64 [ISPConfig 3]

  3. El servidor perfecto - Ubuntu Natty Narwhal (Ubuntu 11.04) [ISPConfig 2]

  4. El servidor perfecto - Ubuntu 11.04 [ISPConfig 3]

  5. El servidor perfecto:CentOS 6.1 x86_64 con Apache2 [ISPConfig 3]

El servidor perfecto:CentOS 6.2 x86_64 con Apache2 [ISPConfig 3]

El servidor perfecto:CentOS 6.1 x86_64 con nginx [ISPConfig 3]

El servidor perfecto - Ubuntu 12.10 (Apache2, BIND, Dovecot, ISPConfig 3)

El servidor perfecto - OpenSUSE 12.2 x86_64 (nginx, Dovecot, ISPConfig 3)

El servidor perfecto:CentOS 6.3 x86_64 (nginx, Dovecot, ISPConfig 3)

El servidor perfecto - CentOS 6.3 x86_64 (nginx, Courier, ISPConfig 3)

            location /squirrelmail {
                   root /usr/share/;
                   index index.php index.html index.htm;
                   location ~ ^/squirrelmail/(.+\.php)$ {
                           try_files $uri =404;
                           root /usr/share/;
                           fastcgi_pass 127.0.0.1:9000;
                           fastcgi_param HTTPS $fastcgi_https; # <-- add this line
                           fastcgi_index index.php;
                           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                           include /etc/nginx/fastcgi_params;
                           fastcgi_buffer_size 128k;
                           fastcgi_buffers 256 4k;
                           fastcgi_busy_buffers_size 256k;
                           fastcgi_temp_file_write_size 256k;
                           fastcgi_intercept_errors on;
                   }
                   location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /usr/share/;
                   }
            }
            location /webmail {
                   rewrite ^/* /squirrelmail last;
            }