rpm -q bind //查询是否安装bind yum -y install bind vi /etc/named.conf //修改配置文件 //更改 any 两处 listen-on port 53 { any; }; allow-query { any; };
vi /etc/named.rfc1912.zones //修改配置文件 增加域名: 正向 zone "cqipc18.edu." IN { type master; file "cqipc18.edu.zone"; allow-update { none; }; }; 反向 zone "118.16.172.in-addr.arpa" IN { type master; file "118.16.172.zone"; allow-update { none; }; };
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
cd /var/named cp -p named.localhost cqipc18.edu.zone vi cqipc18.edu.zone
正向 $TTL 1D @ IN SOA @ rname.invalid. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ NS dns.cqipc18.edu. dns A 172.16.118.118 www A 172.16.118.200 ftp A 172.16.118.201 mail A 172.16.118.202 @ MX 6 mail.cqipc18.edu. down CNAME ftp.cqipc18.edu.