GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Perfect Server Automated ISPConfig 3 Instalación en Debian 10 - 11 y Ubuntu 20.04

Este tutorial lo guiará a través de la instalación de su propia configuración de servidor único ISPConfig 3 usando el instalador automático de ISPConfig. Este instalador sigue las antiguas guías de Perfect Server pero es más modular y fácil de seguir. Si desea establecer una configuración multiservidor con servidores dedicados para cada servicio, consulte la guía Perfect Multiserver.

Esta guía funciona tanto para Debian 10, Debian 11 y Ubuntu 20.04. Usaremos el nombre de host server1.example.com. Reemplácelo donde sea necesario. La guía requiere un sistema operativo base recién instalado y vacío, no intente usarlo en un sistema donde ya configuró otros servicios.

1. Iniciar sesión en el servidor

Inicie sesión como root o ejecute

su -

para convertirse en el usuario raíz de su servidor antes de continuar. IMPORTANTE :Debe usar 'su -' y no solo 'su', de lo contrario, Debian configura incorrectamente su variable PATH.

2. Configure el nombre de host y los hosts

El nombre de host de su servidor debe ser un subdominio como "server1.example.com". No use un nombre de dominio sin una parte de subdominio como "example.com" como nombre de host, ya que esto causará problemas con su configuración más adelante. Primero, debe verificar el nombre de host en /etc/hosts y cambiarlo cuando sea necesario. La línea debe ser:"Dirección IP - espacio - nombre de host completo, incluido el dominio - espacio - parte del subdominio". Para nuestro nombre de host server1.example.com, el archivo se verá así (algunas líneas pueden ser diferentes, puede diferir según el proveedor de alojamiento):

nano /etc/hosts
127.0.0.1 localhost.localdomain   localhost
# This line should be changed to the correct servername:
127.0.1.1 server1.example.com server1
# The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters

Luego edite el archivo /etc/hostname:

nano /etc/hostname

Contendrá solo la parte del subdominio, en nuestro caso:

server1

Finalmente, reinicia el servidor para aplicar el cambio:

systemctl reboot

Inicie sesión nuevamente y verifique si el nombre de host es correcto ahora con estos comandos:

hostname
hostname -f

La salida será así:

[email protected]:~$ hostname
server1
[email protected]:~$ hostname -f
server1.example.com

También deberá configurar un registro DNS con su proveedor de DNS que apunte a su servidor. Debe haber un registro A (y/o AAAA) para el subdominio que apunte a su IP pública.

3. Actualizar el sistema

Para actualizar los paquetes del sistema, ejecute el comando:

apt update && apt upgrade

4. Ejecute el instalador automático

Ahora podemos ejecutar el instalador automático. La configuración básica contiene los siguientes paquetes de software (más sus dependencias, por supuesto):Apache2, PHP (versiones 5.6 - 8.0), MariaDB, Postfix, Dovecot, Rspamd, BIND, Jailkit, Roundcube, PHPMyAdmin, Mailman, Webalizer, AWStats y GoAccess. Puede elegir fácilmente no usar ciertas funciones o instalar servicios adicionales pasando argumentos al instalador. Puede ver todos los argumentos con:

wget -O - https://get.ispconfig.org | sh -s -- --help

Ahora puede ejecutar el script con argumentos. Por ejemplo, si desea una instalación normal con un rango de puertos para FTP pasivo + actualizaciones desatendidas, ejecute:

wget -O - https://get.ispconfig.org | sh -s -- --use-ftp-ports=40110-40210 --unattended-upgrades

Después de un tiempo, verá:

WARNING! This script will reconfigure your complete server!
It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
Type 'yes' if you really want to continue:

Responda "sí" y presione enter. Ahora se iniciará el instalador.

Cuando el instalador haya terminado, le mostrará el administrador de ISPConfig y la contraseña raíz de MySQL de esta manera:

[INFO] Your ISPConfig admin password is: 5GvfSSSYsdfdYC
[INFO] Your MySQL root password is: kkAkft82d!kafMwqxdtYs

Asegúrese de anotar esta información, ya que la necesitará más adelante.

5. Configuración del cortafuegos

Lo último que debe hacer es configurar nuestro firewall.

Inicie sesión en la interfaz de usuario de ISPConfig y vaya a Sistema -> Firewall. Luego haga clic en "Agregar nuevo registro de firewall".

Para una configuración normal, se vería así:

TCP:

20,21,22,25,80,443,40110:40210,110,143,465,587,993,995,53,8080,8081

UDP:

53

Los puertos necesarios para cada servicio son:

Web:20, 21, 22, 80, 443 y 40110:40210 (Todo TCP, sin UDP)

Correo:25, 110, 143, 465, 587, 993 y 995 (Todo TCP, no UDP)

DNS:53 (TCP y UDP)

Panel:8080 y 8081 (Todo TCP, sin UDP)

Su servidor ahora está configurado y listo para usar. Puede iniciar sesión en https://server1.example.com:8080

6. Opciones avanzadas

El instalador automático tiene varias opciones de línea de comandos para ajustar la configuración. Puede, por ejemplo, elija entre el servidor web Apache y Nginx y qué servicios se instalarán en el sistema. Los argumentos de la línea de comandos son:

Usage: ispc3-ai.sh [] [...]

This script automatically installs all needed packages for an ISPConfig 3 setup using the guidelines from the "Perfect Server Setup" howtos on www.howtoforge.com.

Possible arguments are:
    --help          Show this help page
    --debug         Enable verbose logging (logs each command with the exit code)
    --channel       Choose the channel to use for ISPConfig. --channel=<stable|dev>
                    "stable" is the latest ISPConfig release available on www.ispconfig.org
                    "dev" is the latest stable-branch from the ISPConfig git repository: https://git.ispconfig.org/ispconfig/ispconfig3/tree/stable-3.1
                    -> The dev channel might contain bugs and less-tested features and should only be used in production by very experienced users.
    --lang          Use language for ISPConfig installation. Specify with --lang=en|de (only en (English) and de (German) supported currently).
    --interactive   Don't install ISPConfig in non-interactive mode. This is needed if you want to use expert mode, e. g. to install a slave server that shall be integrated into an existing
                    multiserver setup.
    --use-nginx     Use nginx webserver instead of apache2
    --use-amavis    Use amavis instead of rspamd for mail filtering
    --use-unbound   Use unbound instead of bind9 for local resolving. Only allowed if --no-dns is set.
    --use-php       Use specific PHP versions, comma separated, instead of installing multiple PHP, e.g. --use-php=7.4,8.0 (5.6, 7.0, 7.1, 7.2, 7.3, 7.4 and 8.0 available).
                    --use-php=system disables the sury repository and just installs the system's default PHP version.
                    ommiting the argument (use all versions)
    --use-ftp-ports This option sets the passive port range for pure-ftpd. You have to specify the port range separated by hyphen, e. g. --use-ftp-ports=40110-40210.
                    If not provided the passive port range will not be configured.
    --use-certbot   Use Certbot instead of acme.sh for issuing Let's Encrypt certificates. Not adviced unless you are migrating from a old server that uses Certbot.
    --no-web        Do not use ISPConfig on this server to manage webserver setting and don't install nginx/apache or pureftpd. This will also prevent installing an ISPConfig UI and implies
                    --no-roundcube as well as --no-pma
    --no-mail       Do not use ISPConfig on this server to manage mailserver settings. This will install postfix for sending system mails, but not dovecot and not configure any settings for
                    ISPConfig mail. It implies --no-mailman.
    --no-dns        Do not use ISPConfig on this server to manage DNS entries. Bind will be installed for local DNS caching / resolving only.
    --no-local-dns  Do not install local DNS caching / resolving via bind.
    --no-firewall   Do not install ufw and tell ISPConfig to not manage firewall settings on this server.
    --no-roundcube  Do not install roundcube webmail.
    --roundcube     Install Roundcube even when --no-mail is used. Manual configuration of Roundcube config is needed.
    --no-pma        Do not install PHPMyAdmin on this server.
    --no-mailman    Do not install Mailman mailing list manager.
    --no-quota      Disable file system quota
    --no-ntp        Disable NTP setup
    --unattended-upgrades
                    Install UnattendedUpgrades. You can add extra arguments for automatic cleanup and automatic reboots when necessary with --unattended-upgrades=autoclean,reboot (or only
                    one of them).
    --i-know-what-i-am-doing
                    Prevent the autoinstaller to ask for confirmation before continuing to reconfigure the server.

Por ejemplo, para instalar un 'Servidor perfecto' como una configuración con Nginx en lugar de Apache, use este comando:

wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --use-ftp-ports=40110-40210 --unattended-upgrades

O para instalar un servidor web Nginx sin servicios de correo electrónico y DNS:

wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --no-dns --no-mail --use-ftp-ports=40110-40210 --unattended-upgrades

7. Finalizando

¡Tu configuración ya está lista!

Puede admitir ISPConfig comprando nuestro manual:https://www.ispconfig.org/documentation/

Los siguientes enlaces son algunos tutoriales/indicadores útiles para una mayor configuración:

  • Configuración de correo (rDNS, SPF, DKIM):https://www.howtoforge.com/how-to-install-an-email-server-with-ispconfig-on-debian-10/
  • Ajuste de Roundcube:https://www.howtoforge.com/community/threads/tweaking-the-roundcube-settings.86387/
  • Configuración de autoconfig (configuración automática para sus clientes de correo electrónico):https://schaal-it.com/ispconfig-automail/
  • Mejore la seguridad de PHPMyAdmin y la interfaz rspamd:https://www.howtoforge.com/community/threads/improving-the-security-of-phpmyadmin-and-rspamd-ui.86544/
  • Repositorio de código y seguimiento de problemas del instalador automático de ISPConfig:https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller

Si tienes alguna pregunta, hazla en el foro.


Ubuntu
  1. Instalación del servidor Ubuntu 20.04

  2. El servidor perfecto:Ubuntu 15.04 (nginx, BIND, Dovecot e ISPConfig 3)

  3. Configuración de ISPConfig Perfect Multiserver en Ubuntu 20.04 y Debian 10

  4. Perfect Server Automated ISPConfig 3 Instalación en Debian 10 - 11 y Ubuntu 20.04

  5. Perfect Server Automated ISPConfig 3 Instalación en Debian 10 - 11 y Ubuntu 20.04

El servidor perfecto - Debian 8.4 Jessie (Apache2, BIND, Dovecot, ISPConfig 3.1)

El servidor perfecto:Debian 9 (Stretch) con Apache, BIND, Dovecot, PureFTPD e ISPConfig 3.1

El servidor perfecto:Debian 10 (Buster) con Apache, BIND, Dovecot, PureFTPD e ISPConfig 3.2

Instalar y configurar Virtualmin en el servidor Ubuntu 20.04 / Debian 10

El servidor perfecto - Ubuntu 11.04 [ISPConfig 3]

El servidor perfecto - Ubuntu 11.10 [ISPConfig 3]