【1】 dns服务器简介
1】服务器类型
a 根域名服务器 hintyum install bind -y
yum install bind-chroot -y
yum install caching-nameserver -y
//
options { listen-on port 53 { any; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; allow-query-cache{ any; }; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "aigo.com" { type master; file "aigo.com.zone"; allow-transfer { 192.168.68.245; }; };
//
//aigo.com.zone
//
$TTL 86400 @ IN SOA localhost root ( 42 ; 3H ; 15M ; 1W ; 1D) IN NS dns IN MX 10 mail.aigo.com. dns IN A 192.168.68.250 www IN A 192.168.68.254 mail IN A 192.168.68.249 wwww IN CNAME www * IN A 192.168.68.1
[6] 配置从域名服务器
a 安装相同的软件
b named.conf 配置文件
options { listen-on port 53 { any; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; allow-query-cache{ any; }; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "aigo.com" { type slave; masters { 192.168.68.250; }; file "aigo.com.zone"; };