Top Banner
GNU General Public License La Licencia Pública General de GNU o más conocida por su nombre en inglés GNU General Public License o simplemente sus siglas del inglés GNU GPL , es una licencia creada por la Free Software Foundation en 1989 (la primera versión), y está orientada principalmente a proteger la libre distribución, modificación y uso de software . Su propósito es declarar que el software cubierto por esta licencia es software libre y protegerlo de intentos de apropiación que restrinjan esas libertades a los usuarios. Ubuntu 11.04 [ISPConfig 3] Este tutorial muestra cómo preparar un Ubuntu 11.04 (Natty Narwhal) del servidor para la instalación de ISPConfig 3 , y cómo instalar ISPConfig 3. ISPConfig 3 es un panel de control de alojamiento web que te permite configurar los siguientes servicios a través de un navegador web: servidor web Apache, servidor de correo Postfix, MySQL, servidor de nombres BIND o MyDNS, PureFTPd, SpamAssassin, ClamAV, y muchos más. Por favor, tenga en cuenta que esta configuración no funciona para ISPConfig 2 ! Es válido para ISPConfig 3 sólo! Para instalar el sistema se necesita lo siguiente: el servidor de Ubuntu 11.04 CD, disponible aquí: http://releases.ubuntu.com/releases/11.04/ubuntu-11.04-server-i386.iso (i386) ohttp://releases.ubuntu.com/releases/11.04/ ubuntu-11.04-server-amd64.iso (x86_64) una conexión rápida a Internet. 2 Nota preliminar En este tutorial se utiliza 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 . Estos valores pueden ser diferentes para usted, así que tienes que reemplazarlos en su caso. 3 El sistema base Inserte el CD de instalación de Ubuntu en tu sistema y arrancar desde él. Seleccione su idioma:
34

TUTORIAL ispconfig3 en ubuntu 11.04.docx

Oct 25, 2015

Download

Documents

Miguel Dirane
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TUTORIAL ispconfig3 en ubuntu 11.04.docx

GNU General Public LicenseLa Licencia Pública General de GNU o más conocida por su nombre en inglés GNU General Public License o simplemente sus siglas del inglés GNU GPL, es una licencia creada por la Free Software Foundation en 1989 (la primera versión), y está orientada principalmente a proteger la libre distribución, modificación y uso de software. Su propósito es declarar que el software cubierto por esta licencia es software libre y protegerlo de intentos de apropiación que restrinjan esas libertades a los usuarios.

Ubuntu 11.04 [ISPConfig 3] 

Este tutorial muestra cómo preparar un Ubuntu 11.04 (Natty Narwhal) del servidor para la instalación

de ISPConfig 3 , y cómo instalar ISPConfig 3. ISPConfig 3 es un panel de control de alojamiento web que te

permite configurar los siguientes servicios a través de un navegador web: servidor web Apache, servidor de

correo Postfix, MySQL, servidor de nombres BIND o MyDNS, PureFTPd, SpamAssassin, ClamAV, y muchos

más.

Por favor, tenga en cuenta que esta configuración no funciona para ISPConfig 2 ! Es válido para ISPConfig 3

sólo!

Para instalar el sistema se necesita lo siguiente:

el servidor de Ubuntu 11.04 CD, disponible aquí: http://releases.ubuntu.com/releases/11.04/ubuntu-11.04-

server-i386.iso (i386) ohttp://releases.ubuntu.com/releases/11.04/ ubuntu-11.04-server-amd64.iso (x86_64)

una conexión rápida a Internet.

2 Nota preliminar

En este tutorial se utiliza 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 . Estos valores pueden ser diferentes para usted, así que tienes que

reemplazarlos en su caso.

3 El sistema base

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

A continuación, seleccione Instalar Ubuntu

Server :Elija su idioma nuevo (?)

Page 2: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Elija su idioma nuevo (?) A continuación, seleccione su ubicación:

Si ha seleccionado una combinación poco frecuente de la lengua y la ubicación (como el Inglés como el

idioma y Alemania, como la ubicación, como en mi caso), el instalador le puede decir que no hay lugar

definido para esta combinación, en este caso usted tiene para seleccionar la localización manualmente. Puedo seleccionar es_ES.UTF-8 aquí:

Elija un diseño de teclado (se le pedirá que pulsar unas pocas teclas, y el instalador intentará detectar la

distribución del teclado sobre la base de las teclas que presiona):

Page 3: TUTORIAL ispconfig3 en ubuntu 11.04.docx

El programa de instalación comprueba el CD de instalación, su hardware y configura la red con DHCP si hay

un servidor DHCP en la red:

Introduzca el nombre de host. En este ejemplo, mi sistema se llama server1.example.com , por lo que

entrar en server1 :

Por favor, compruebe si el instalador detecta la zona horaria correcta. Si es así, seleccione Sí , de lo

contrario no :

Page 4: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Ahora usted tiene que particionar el disco duro. Por razones de simplicidad selecciono Guiado - utilizar

todo el disco y configurar LVM - esto creará un grupo de volúmenes con dos volúmenes lógicos, uno

para el / sistema de archivos y otra para swap (por supuesto, el reparto es totalmente de usted - si sabes lo

que estás haciendo, también puede configurar sus particiones de forma manual).

Seleccione el disco que desea crear una partición:

Cuando se le pida ? Escribe los cambios en los discos y configurar LVM , seleccione Sí :

Page 5: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Si ha seleccionado Guiado - utilizar todo el disco y configurar LVM , la herramienta de particionado

creará un grupo de gran volumen que utiliza todo el espacio en disco. Ahora puede especificar qué parte de ese espacio en el disco debe ser utilizado por los volúmenes lógicos para / y swap. No tiene sentido dejar un

poco de espacio no utilizado de manera que pueda posteriormente ampliar sus volúmenes lógicos existentes

o crear otras nuevas - esto le da más flexibilidad.

Cuando termine, pulse Sí cuando se le

pregunte Escribe los cambios en los

discos? :

Posteriormente, las particiones se crean nuevas

y formato:

Ahora el sistema base se va a instalar:

Crear un usuario, por ejemplo, el usuario administrador con el nombre de usuario administrador (no

utilice el nombre de usuario administrador , ya que es un nombre reservado en Ubuntu 11.04):

Page 6: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Yo no necesito un directorio privado encriptado, así que elige no aquí:

A continuación, el gestor de paquetes apt se configuran. Deje la línea de proxy HTTP vacío a menos que

usted está usando un servidor proxy para conectarse a Internet:

Page 7: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Estoy un poco pasada de moda y les gusta actualizar mis servidores manualmente para tener más control, por lo tanto seleccione No hay actualizaciones automáticas .Por supuesto, le toca a usted lo que usted

seleccione aquí:

Necesitamos un DNS, el correo y servidor LAMP, pero sin embargo yo no seleccionar ninguno de ellos ahora,

porque me gusta tener un control total sobre lo que se instala en mi sistema. Vamos a instalar los paquetes necesarios manualmente más adelante. El único artículo que seleccione aquí es servidor OpenSSH para que

de inmediato se puede conectar al sistema con un cliente SSH como PuTTY después de la instalación ha

finalizado:

Page 8: TUTORIAL ispconfig3 en ubuntu 11.04.docx

La instalación sigue:

El gestor de arranque GRUB se instala: Seleccione Sí cuando se le solicite instalar el

gestor de arranque GRUB en el registro

de inicio maestro? :

La instalación del sistema base ya está terminado. Retire el CD de instalación de la unidad de CD y pulse Continuar para reiniciar el sistema:

En el siguiente paso ...

4 obtener privilegios de root

 

Después del reinicio, puedes conectarte con tu nombre de usuario creado anteriormente (por ejemplo, administrador ).Porque tenemos que ejecutar todos los pasos de este tutorial con privilegios de

root, se puede anteponer todos los comandos de este tutorial con la cadena de sudo , o nos convertimos en

la raíz en estos momentos escribiendo

Page 9: TUTORIAL ispconfig3 en ubuntu 11.04.docx

sudo su

(Usted puede también permitir la entrada de root mediante la ejecución de

sudo passwd root

y dando raíz una contraseña. A continuación, puede directamente acceder como root, pero esto es mal visto

por los desarrolladores de Ubuntu y la comunidad por varias razones. 

Véase http://ubuntuforums.org/showthread.php?t=765414 .)

 

5 Para instalar el servidor SSH (Opcional)

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

apt-get install ssh openssh-server

A partir de ahora usted puede usar un cliente SSH como PuTTY y conectarse desde su estación de trabajo a

su servidor de Ubuntu 11.04, y siga los pasos restantes de este tutorial.

 

6 Instalar vim-nox (Opcional)

Voy a usar vi como mi editor de texto en este tutorial. El valor por defecto vi el programa tiene un

comportamiento extraño en Ubuntu y Debian, para solucionar este problema, se instala vim-nox :

apt-get install vim-nox

(Usted no tiene que hacer esto si usted utiliza 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 los parámetros de red a

través de DHCP, tenemos que cambiar eso ahora, porque un servidor debe tener una dirección IP estática. Editar el archivo /etc/network/interfaces y ajustarlo a sus necesidades (en este ejemplo de

configuración voy a utilizar la dirección IP 192.168.0.100 ):

vi /etc/network/interfaces

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

# The loopback network interfaceauto loiface lo inet loopback

# The primary network interfaceauto eth0

Page 10: TUTORIAL ispconfig3 en ubuntu 11.04.docx

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

A continuación, reinicie su red:

/etc/init.d/networking restart

A continuación, edite /etc/hosts . Hacer que se vea como esto:

vi /etc/hosts

127.0.0.1 localhost.localdomain localhost192.168.0.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts::1 ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allrouters

Ahora ejecute

eco server1.example.com> /etc/host 

/etc/init.d/hostname restart

A continuación, ejecute

hostname 

hostname-f

Ambos deben mostrar server1.example.com ahora.

 

8 Editar el archivo /etc/apt/sources.list y actualizar la instalación de Linux

Editar el archivo /etc/apt/sources.list . Puede comentar o eliminar el CD de instalación del archivo y

asegúrese de que el universo y multiverso repositorios están habilitadas. Se debe tener este aspecto:

vi /etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.

Page 11: TUTORIAL ispconfig3 en ubuntu 11.04.docx

deb http://de.archive.ubuntu.com/ubuntu/ natty main restricteddeb-src http://de.archive.ubuntu.com/ubuntu/ natty main restricted

## Major bug fix updates produced after the final release of the## distribution.deb http://de.archive.ubuntu.com/ubuntu/ natty-updates main restricteddeb-src http://de.archive.ubuntu.com/ubuntu/ natty-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/ natty universedeb-src http://de.archive.ubuntu.com/ubuntu/ natty universedeb http://de.archive.ubuntu.com/ubuntu/ natty-updates universedeb-src http://de.archive.ubuntu.com/ubuntu/ natty-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/ natty multiversedeb-src http://de.archive.ubuntu.com/ubuntu/ natty multiversedeb http://de.archive.ubuntu.com/ubuntu/ natty-updates multiversedeb-src http://de.archive.ubuntu.com/ubuntu/ natty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'## repository.## 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.

Page 12: TUTORIAL ispconfig3 en ubuntu 11.04.docx

# deb http://de.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse# deb-src http://de.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu natty-security main restricteddeb-src http://security.ubuntu.com/ubuntu natty-security main restricteddeb http://security.ubuntu.com/ubuntu natty-security universedeb-src http://security.ubuntu.com/ubuntu natty-security universedeb http://security.ubuntu.com/ubuntu natty-security multiversedeb-src http://security.ubuntu.com/ubuntu natty-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 natty partner# deb-src http://archive.canonical.com/ubuntu natty 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 natty main# deb-src http://extras.ubuntu.com/ubuntu natty main

A continuación, ejecute

apt-get update

para actualizar la base de datos de paquetes apt

apt-get upgrade

para instalar las últimas actualizaciones (si las hay). Si usted ve que un nuevo núcleo se instala como parte

de las actualizaciones, debe reiniciar el sistema después:

reboot

9 Cambiar el shell por defecto

/bin/sh es un enlace simbólico a /bin/dash , sin embargo tenemos que /bin/bash , no /bin/dash . Por lo

tanto, haga lo siguiente:

Page 13: TUTORIAL ispconfig3 en ubuntu 11.04.docx

dpkg-reconfigure dash

Use dash as the default system shell (/bin/sh)? <-- No

Utilice el tablero como el shell por defecto del sistema (/bin/sh)? <- No

Si no lo hace, en la instalación de ISPConfig se producirá un error.

10 Desactivar AppArmor

AppArmor es una extensión de seguridad (similar a SELinux) que debe proporcionar mayor seguridad.  En mi

opinión no lo necesitan para configurar un sistema seguro, y por lo general causa más problemas que

ventajas (pensar en ello después de haber hecho una semana de la solución de problemas debido a algún

servicio no estaba funcionando como se esperaba, y entonces saber que todo estaba bien, sólo AppArmor

fue la causa del problema). Por lo tanto puedo desactivarlo (esto es una necesidad si usted quiere instalar

ISPConfig más adelante).

Podemos desactivar de esta manera:

/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 para sincronizar el reloj del sistema con un servidor NTP  (network time protocol) del

servidor a través de Internet. Basta con ejecutar

apt-get install ntp ntpdate

y la hora del sistema siempre estará en sincronía.

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 pedirá a las siguientes preguntas:

New password for the MySQL "root" user: <-- yourrootsqlpasswordRepeat password for the MySQL "root" user: <-- yourrootsqlpasswordGeneral type of mail configuration: <-- Internet SiteSystem mail name: <-- server1.example.comCreate directories for web-based administration? <-- NoSSL certificate required <-- Ok

Page 14: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Nueva contraseña para el MySQL usuario "root": <- yourrootsqlpassword  

Repite el password de MySQL para el usuario "root": <- yourrootsqlpassword  

Tipo general de configuración de correo: <- Sitio de Internet  

Sistema de nombre de correo: <- server1.example. com  

Crea los directorios de administración basada en web? <- No se  

requiere certificado SSL <- Ok

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

vi /etc/mysql/my.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[...]

Luego reinicie MySQL:

/ Etc / init.d / mysql restart

Ahora compruebe que la red está habilitada. Ejecutar

netstat-tap | grep mysql

La salida debería tener este aspecto:root@server1:~# netstat -tap | grep mysqltcp        0      0 *:mysql                 *:*                     LISTEN      9990/mysqldroot@server1:~#

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

tutorial), elimine los certificados de …

cd /etc/courier 

rm-f /etc/courier/imapd.pem 

rm-f /etc/courier/pop3d.pem

... y modificar los dos archivos siguientes, reemplace CN=localhost con el CN=server1.example.com

(también se puede modificar los valores de otros, si es necesario):

vi /etc/courier/imapd.cnf

[...]

Page 15: TUTORIAL ispconfig3 en ubuntu 11.04.docx

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

vi /etc/courier/pop3d.cnf

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

A continuación, volver a crear los certificados de ...

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 Instalar Amavisd-new, SpamAssassin, y ClamAV

Para instalar amavisd-new, SpamAssassin, ClamAV, y se corre

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

El programa de instalación utiliza ISPConfig 3 amavisd que se carga la biblioteca de SpamAssassin filtro

interno, para que podamos dejar de SpamAssassin para liberar algo de memoria RAM:

/etc/init.d/spamassassin stop

update-rc.d -f spamassassin remove

14 Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt

Apache 2, PHP5, phpMyAdmin, FCGI, suexec, pera, y mcrypt puede ser instalado de la siguiente manera:

apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils

libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap

phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-

mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby

Verá la siguiente pregunta:

Page 16: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Web server to reconfigure automatically: <-- apache2

Configure database for phpmyadmin with dbconfig-common? <-- No

reconfigurar automáticamente: <- apache2  

Configurar la base de datos de phpmyadmin con dbconfig-común? <- No

A continuación, ejecute el comando siguiente para activar el de módulos de Apache suexec , reescritura ,

ssl , acciones , y se incluyen (además de DAV , dav_fs y auth_digest si desea utilizar WebDAV):

a2enmod suexec rewrite ssl actions include

a2enmod dav_fs dav auth_digest

Reiniciar Apache después:

/etc/init.d/apache2 restart

Si usted desea recibir archivos con la extensión de Ruby . rb en sus sitios web creados a través de ISPConfig, debe comentar la línea application/x-rb rubí en /etc/mime.types :

vi /etc/mime.types

[...]#application/x-ruby rb[...]

(Esto es necesario sólo para RB. archivos, los archivos con la extensión de Ruby rbx. trabajar fuera de la caja.)

Reinicia Apache después:

/etc/init.d/apache2 restart

 

15 Instalar PureFTPd y cuotasPureFTPd y la cuota se puede instalar con el siguiente comando:

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

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

Page 17: TUTORIAL ispconfig3 en ubuntu 11.04.docx

vi /etc/default/pure-ftpd-common

... y asegúrese de que el modo de inicio se establecestandalone y un conjunto VIRTUALCHROOT=true:

[...]STANDALONE_OR_INETD=standalone[...]VIRTUALCHROOT=true[...]

Ahora podemos configurar PureFTPd para permitir sesiones FTP y TLS. FTP es un protocolo muy inseguro,

porque todas las contraseñas y los datos de todos se transfieren en texto claro.  Mediante el uso de TLS, toda

la comunicación puede ser encriptada, lo que hace FTP mucho más seguro.

Si desea permitir a FTP y sesiones TLS, ejecute

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

Con el fin de utilizar TLS, debemos crear un certificado SSL. Yo lo cree en /etc/ssl/private/ , por lo tanto,

creo que el primer directorio:

mkdir -p /etc/ssl/private/

Después, 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

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").

State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name.

Locality Name (eg, city) []: <-- Enter your City.

Organization Name (eg, company) [Internet Widgits Pty 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) []: <-- Enter the Fully Qualified Domain Name of the system (e.g.

"server1.example.com").Email Address []: <-- Enter your Email Address.

Cambiar los permisos del certificado SSL:

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

Page 18: TUTORIAL ispconfig3 en ubuntu 11.04.docx

a continuación reinice PureFTPd:

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

Editar /etc/fstab.

Mira se parece a esto (he añadido ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 a la

partición con el punto de montaje /):

vi /etc/fstab

# /etc/fstab: static file system information.## Use 'blkid -o value -s UUID' 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 installationUUID=deae7cd1-b106-47aa-9a7c-512f046d2ebf /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

Para habilitar cuotas, ejecute los siguientes comandos:

mount -o remount /

quotacheck -avugm

quotaon -avug

 

Page 19: TUTORIAL ispconfig3 en ubuntu 11.04.docx

16 Instalación de BIND DNS Server

BIND se puede instalar de la siguiente manera:

apt-get install bind9 dnsutils

 

17 Install Vlogger, Webalizer, And AWstats

Vlogger, webalizer y AWstats pueden ser instalados de la siguiente manera:

apt-get install vlogger webalizer awstats geoip-database

Abrir /etc/cron.d/awstats

vi /etc/cron.d/awstats

... y comentar los dos trabajos de cron en este archivo:

#*/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

 

18 Install Jailkit

Jailkit sólo es necesario si desea usuarios chroot SSH. Se puede instalar de la siguiente manera ( importante:

Jailkit debe estar instalado antes de ISPConfig - no se puede instalar después! ):

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

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/rules binary

cd ..

dpkg -i jailkit_2.14-1_*.deb

rm -rf jailkit-2.14*

Page 20: TUTORIAL ispconfig3 en ubuntu 11.04.docx

19 Install fail2ban

Esto es opcional pero recomendable, ya que el monitor ISPConfig intenta mostrar el registro de fail2ban:

apt-get install fail2ban

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

vi /etc/fail2ban/jail.local

[pureftpd]

enabled = trueport = ftpfilter = pureftpdlogpath = /var/log/syslogmaxretry = 3

[sasl]

enabled = trueport = smtpfilter = sasllogpath = /var/log/mail.logmaxretry = 5

[courierpop3]

enabled = trueport = pop3filter = courierpop3logpath = /var/log/mail.logmaxretry = 5

[courierpop3s]

enabled = trueport = pop3sfilter = courierpop3slogpath = /var/log/mail.logmaxretry = 5

Page 21: TUTORIAL ispconfig3 en ubuntu 11.04.docx

[courierimap]

enabled = trueport = imap2filter = courierimaplogpath = /var/log/mail.logmaxretry = 5

[courierimaps]

enabled = trueport = imapsfilter = courierimapslogpath = /var/log/mail.logmaxretry = 5

A continuación, cree los siguientes cinco archivos de filtro:

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

[Definition]failregex = .*pure-ftpd: \(.*@<HOST>\) \[WARNING\] Authentication failed for user.*ignoreregex =

vi /etc/fail2ban/filter.d/courierpop3.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

Page 22: TUTORIAL ispconfig3 en ubuntu 11.04.docx

# 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/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-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/courierimap.conf

Page 23: TUTORIAL ispconfig3 en ubuntu 11.04.docx

# 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 =

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

Page 24: TUTORIAL ispconfig3 en ubuntu 11.04.docx

#failregex = imapd-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\]

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

Reiniciar fail2ban :

/etc/init.d/fail2ban restart

20 Install SquirrelMail

Para instalar el cliente de correo web de SquirrelMail, ejecute

apt-get install squirrelmail

a continuación cree el siguiente enlace..

ln -s /usr/share/squirrelmail/ /var/www/webmail

... y configure SquirrelMail:

squirrelmail-configure

Tenemos que decir a SquirrelMail que estamos utilizando 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

Page 25: TUTORIAL ispconfig3 en ubuntu 11.04.docx

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on

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.

Page 26: TUTORIAL ispconfig3 en ubuntu 11.04.docx

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

    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 any key 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

Page 27: TUTORIAL ispconfig3 en ubuntu 11.04.docx

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

Page 28: TUTORIAL ispconfig3 en ubuntu 11.04.docx

Command >> <--   Q

Después se puede accede a SquirrelMail de la siguiente forma.  http://server1.example.com/webmail or http://192.168.0.100/webmail:

21 Install ISPConfig 3

Para instalar ISPConfig 3 de la última versión liberada, haga lo siguiente:

cd /tmp

wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz

tar xfz ISPConfig-3-stable.tar.gz

cd ispconfig3_install/install/

el siguiente paso es ejecutar

php -q install.php

Esto iniciará el instalador de ISPConfig 3. El programa de instalación configura todos los servicios como

Postfix, SASL, Courier, etc para usted. Una configuración manual que se requiere para ISPConfig 2 (guías

perfectos de ajuste) no es necesario.

root@server1:/tmp/ispconfig3_install/install# php -q install.php

--------------------------------------------------------------------------------

 _____ ___________   _____              __ _         ____

|_   _/  ___| ___ \ /  __ \            / _(_)       /__  \

  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /

  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |

 _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \

 \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/

                                              __/ |

Page 29: TUTORIAL ispconfig3 en ubuntu 11.04.docx

                                             |___/

--------------------------------------------------------------------------------

>> Initial configuration

Operating System: Debian 6.0 (Squeeze/Sid) or compatible

    Following will be a few questions for primary configuration so be careful.

    Default values are in [brackets] and can be accepted with <ENTER>.

    Tap in "quit" (without the quotes) to stop the installer.

Select language (en,de) [en]: <--   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) [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

Page 30: TUTORIAL ispconfig3 en ubuntu 11.04.docx

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 Firewall

Installing ISPConfig

ISPConfig Port [8080]: <--   ENTER

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 27585

 * 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

   ...done.

 * Stopping Courier authentication services authdaemond

   ...done.

 * Starting Courier authentication services authdaemond

   ...done.

Page 31: TUTORIAL ispconfig3 en ubuntu 11.04.docx

 * Stopping Courier IMAP server imapd

   ...done.

 * Starting Courier IMAP server imapd

   ...done.

 * Stopping Courier IMAP-SSL server imapd-ssl

   ...done.

 * Starting Courier IMAP-SSL server 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 web server apache2

 ... waiting .   ...done.

Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-

ftpd/db/mysql.conf -l pam -E -Y 1 -8 UTF-8 -H -A -O clf:/var/log/pure-ftpd/transfer.log -D 

-b -u 1000 -B

Installation completed.

root@server1:/tmp/ispconfig3_install/install#

El programa de instalación configura automáticamente todos los servicios básicos, por lo que no es necesaria

la configuración manual.

Después se puede acceder a ISPConfig 3 bajo http://server1.example.com:8080/ o http://192.168.0.100:8080/ . Inicie sesión con el nombre de

usuario administrador y la contraseña de administrador (que debe cambiar la contraseña por defecto

después de su primer inicio de sesión):

El sistema está ahora listo para ser utilizado.