Como criar um Domínio
Autor: Mayla | Publicado: 2010-04-01T15:18:00-07:00

Professor João, nos passou a seguinte atividade:
Descrever o procedimento de como criar o domínio a seguir.
Domínio: estudemais.edu.brNome do host: dns1IP do Servidor: 200.133.17.130Nome do Arquivo de Sona Direta: estude.zoneServidor de e-mail: dns1

- Logar como root &nbsp;&nbsp; su - 
- Instalar o bind9&nbsp;&nbsp; aptitude install bind9
- Após a instalação entramos no diretório do bind&nbsp;&nbsp; cd /etc/bind
- Fazemos a Cópia do db.local para o novo arquivo de zona direta (estude.zone)&nbsp;&nbsp; cp db.local estude.zone
- Agora, é necessário fazer a configuração do domínio, para isso iremos editá-la&nbsp;&nbsp; vim estude.zone
- Esse é o arquivo original &nbsp;&nbsp; 1- $TTL &nbsp; 604800&nbsp;&nbsp; 2- @ IN&nbsp;&nbsp; SOA&nbsp;&nbsp; localhost. root.localhost. ( &nbsp;&nbsp; 3-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Serial&nbsp;&nbsp; 4- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 604800&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Refresh&nbsp;&nbsp; 5-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 86400&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Retry&nbsp;&nbsp; 6-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2419200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Expire7-&nbsp;&nbsp; 7-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 604800 )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Negative Cache TTL&nbsp;&nbsp; 8- &nbsp; ;&nbsp;&nbsp; 9-&nbsp;&nbsp; @ &nbsp; IN&nbsp;&nbsp; NS &nbsp; localhost.&nbsp;&nbsp; 10- @&nbsp;&nbsp; IN&nbsp;&nbsp; A&nbsp;&nbsp; 127.0.0.1
- Após Edição
1- $TTL&nbsp;&nbsp; 6048002- @&nbsp; IN&nbsp;&nbsp; SOA&nbsp;&nbsp; dns1.estudemais.edu.br. root.estudemais.edu.br. (3- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ; Expire7-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 604800 ) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Negative Cache TTL8- ;9-&nbsp;&nbsp;&nbsp; @&nbsp; IN&nbsp; &nbsp; NS&nbsp;&nbsp; dns1.estudemais.edu.br.10-&nbsp; @&nbsp; IN&nbsp;&nbsp;&nbsp; A &nbsp; 200.133.17.13011-&nbsp;&nbsp; @&nbsp; IN&nbsp;&nbsp; MX 0 dns1.estudemais.edu.br.12-&nbsp; @&nbsp; dns1.estudemais.edu.br.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN &nbsp;&nbsp; A &nbsp;&nbsp; 200.133.17.130
Onde havia o nome localhost foi substituido pelo nome do host junto ao domíniodns1 (nome do host), estudemais.edu.br (nome do domínio). Na linha 10 foi inserido o ip do servidor 200.133.17.130, nas linhas 11 e 12, colocamos o servidor de e-mail MX (Mail Exchange).
- Configurar o named.conf.local&nbsp;&nbsp; vim named.conf.local 
Esse será o arquivo exibido.
// Do any local configuration here//
// Consider adding the 1918 zones here, if they are not used in your// organization//include "/etc/bind/zones.rfc1918";
Apagamos e digitamos os dados abaixo:
zone "estudemais.edu.br"{type master;file "/etc/bind/estude.zone"; };
Obs: Até agora estavamos no diretório bind. 
- Alterar o nome do host&nbsp;&nbsp; vim /etc/hosts
-Apaga o que esta escrito e insere o ip e o nome do domínio. 200.133.17.130&nbsp;&nbsp; dns1.estudemais.edu.br
- Configurar o resolv.conf&nbsp;&nbsp; vim /etc/resolv.conf
- Apaga o que está escrito e digita o IP do Servidor: &nbsp;&nbsp; nameserver 200.133.17.130
-Reiniciamos o bind&nbsp;/etc/init.d/bind9 restart 
- Verificando o log, para confimar se deu tudo certo!&nbsp; cat /var/log/daemon.log