ISPConfig Setup · 6 min read · Sep 22, 2025
Configuração Perfeita de Multiserver ISPConfig no Ubuntu 20.04 e Debian 10 - Página 6

7 Instalando o servidor de nomes secundário
Faça login como root ou execute
su -para se tornar o usuário root em seu servidor antes de prosseguir. IMPORTANTE: Você deve usar ‘su -‘ e não apenas ‘su’, caso contrário, sua variável PATH será configurada incorretamente pelo Debian.
7.1 Configurar o nome do host
O nome do host do seu servidor deve ser um subdomínio como “panel.example.com”. Não use um nome de domínio sem uma parte de subdomínio como “example.com” como nome do host, pois isso causará problemas mais tarde com sua configuração de e-mail. Primeiro, você deve verificar o nome do host em /etc/hosts e alterá-lo quando necessário. A linha deve ser: “Endereço IP - espaço - nome do host completo incluindo domínio - espaço - parte do subdomínio”. Para nosso nome do host ns2.example.com, o arquivo deve ficar assim:
nano /etc/hosts127.0.0.1 localhost.localdomain localhost
# Esta linha deve ser alterada em cada nó para o nome do servidor correto:
127.0.1.1 ns2.example.com ns2
# Estas linhas são as mesmas em cada nó:
10.0.64.12 panel.example.com panel
10.0.64.13 web01.example.com web01
10.0.64.14 mx1.example.com mx1
10.0.64.15 mx2.example.com mx2
10.0.64.16 ns1.example.com ns1
10.0.64.17 ns2.example.com ns2
10.0.64.18 webmail.example.com webmail
# As linhas a seguir são desejáveis para hosts compatíveis com IPv6
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allroutersComo você pode ver, adicionamos os nomes dos hosts de nossos outros servidores também, para que eles possam se comunicar pela rede interna mais tarde.
Em seguida, edite o arquivo /etc/hostname:
nano /etc/hostnameEle deve conter apenas a parte do subdomínio, no nosso caso:
ns2Finalmente, reinicie o servidor para aplicar a alteração:
systemctl rebootFaça login novamente e verifique se o nome do host está correto agora com estes comandos:
hostname
hostname -fA saída deve ser assim:
root@ns2:~$ hostname
s2
root@ns2:~$ hostname -f
s2.example.com7.2 Instalando o ISPConfig
Agora podemos executar o instalador automático para todos os pacotes e ISPConfig:
wget -O - https://get.ispconfig.org | sh -s -- --no-web --no-mail --use-php=system --interactiveApós algum tempo, você 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 “yes” e pressione enter. O instalador agora começará.
Quando a instalação e configuração dos pacotes estiverem concluídas, a senha root para MySQL no ns2 será exibida. Anote isso (junto com o nome do servidor, para evitar qualquer confusão mais tarde).
Agora teremos que responder algumas perguntas, pois estamos usando o modo interativo. Isso é necessário, pois este servidor será adicionado à sua configuração de multiserver.
[INFO] Installing ISPConfig3.
[INFO] Your MySQL root password is: kl3994aMsfkkeE
--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _| ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
|_| |_|\__/ / | | \__/\ (_) | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |
|___/
--------------------------------------------------------------------------------
>> Initial configuration
Operating System: Debian 10.0 (Buster) or compatible
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]: <-- Hit enter
Installation mode (standard,expert) [standard]: <-- expert
Full qualified hostname (FQDN) of the server, eg server1.domain.tld [ns2.example.com]: <-- Hit Enter
MySQL server hostname [localhost]: <-- Hit Enter
MySQL server port [3306]: <-- Hit Enter
MySQL root username [root]: <-- Hit Enter
MySQL root password []: <-- Enter the MySQL password the script just gave you
MySQL database to create [dbispconfig]: <-- Hit Enter
MySQL charset [utf8]: <-- Hit Enter
The next two questions are about the internal ISPConfig database user and password.
It is recommended to accept the defaults which are 'ispconfig' as username and a random password.
If you use a different password, use only numbers and chars for the password.
ISPConfig mysql database username [ispconfig]: <-- Hit Enter
ISPConfig mysql database password [aakl203920459853sak20284204]: <-- Hit Enter
Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: <-- y
MySQL master server hostname []: <-- panel.example.com
MySQL master server port []: <-- Hit Enter
MySQL master server root username [root]: <-- Hit Enter
MySQL master server root password []: <-- the password you gave the external root user on the master server.
MySQL master server database name [dbispconfig]: <-- Hit Enter
Adding ISPConfig server record to database.
Configure Mail (y,n) [y]: <-- n
[WARN] autodetect for Jailkit failed
Force configure Jailkit (y,n) [n]: <-- Hit enter
Skipping Jailkit
[WARN] autodetect for pureftpd failed
Force configure pureftpd (y,n) [n]: <-- Hit enter
Skipping pureftpd
Configure DNS Server (y,n) [y]: <-- Hit enter
Configuring BIND
The Web Server option has to be enabled when you want run a web server or when this node shall host the ISPConfig interface.
Configure Web Server (y,n) [y]: <-- n
[WARN] autodetect for OpenVZ failed
Force configure OpenVZ (y,n) [n]: <-- Hit enter
Skipping OpenVZ
Configure Firewall Server (y,n) [y]: <-- Hit enter
Configuring Ubuntu Firewall
[WARN] autodetect for Metronome XMPP Server failed
Force configure Metronome XMPP Server (y,n) [n]: <-- Hit enter
Skipping Metronome XMPP Server
Configuring Fail2ban
Install ISPConfig Web Interface (y,n) [n]: <-- Hit enter
Do you want to create SSL certs for your server? (y,n) [y]: <-- n
Configuring DBServer
Installing ISPConfig crontab
Detect IP addresses
Restarting services ...
Failed to restart apache2.service: Unit apache2.service not found.
Installation completed.
[INFO] Checking all services are running.
[INFO] mysql: OK
[INFO] clamav-daemon: OK
[INFO] postfix: OK
[INFO] bind9: OK
[INFO] Installation ready.
[INFO] Your MySQL root password is: kl3994aMsfkkeE
[INFO] Warning: Please delete the log files in /tmp/ispconfig-ai/var/log/setup-* once you don't need them anymore because they contain your passwords! 7.3 Configurando o firewall
A última coisa a fazer é configurar nosso firewall.
Faça login na interface do ISPConfig e vá para Sistema -> Firewall. Em seguida, clique em “Adicionar novo registro de firewall”.
Certifique-se de selecionar o servidor correto. Para nosso servidor de nomes, precisamos abrir as seguintes portas:
TCP:
22,53UDP:
53Também vamos abrir a porta 3306, que é usada para MySQL, mas apenas da nossa rede local por razões de segurança. Para fazer isso, execute o seguinte comando a partir da CLI, após a alteração do painel do ISPConfig ser propagada (quando o ponto vermelho desaparecer):
ufw allow from 10.0.64.0/24 to any port 3306 proto tcpPara configurar suas zonas, primeiro crie a zona em DNS -> Zonas DNS em seu primeiro servidor de nomes e permita transferência + também notifique o endereço IP do seu servidor de nomes secundário. Em seguida, adicione a zona em “Zonas DNS Secundárias” em seu segundo servidor de nomes e permita transferência do IP do seu primeiro servidor de nomes. Não habilite a replicação dentro do ISPConfig para servidores DNS, pois isso quebraria a assinatura de zona DNSSEC; o BIND irá replicar a zona automaticamente quando ela for alterada, portanto, não há necessidade de replicação interna no ISPConfig aqui.
Seu servidor de nomes secundário está agora configurado. Se você quiser adicionar outro servidor de nomes, basta repetir as instruções desta etapa e ajustar o nome do host e o endereço IP de acordo. Na próxima etapa, instalaremos o servidor de webmail.
Receba novas postagens na sua caixa de entrada
Sem spam. Cancele a assinatura a qualquer momento.