1:使用YUM安装bind
yum install bind
2:配置自动启动
chkconfig named on
3:第一次启动named
rndc-confgen -r /dev/urandom -a service named start
4:配置vi /etc/named.conf
key "rndc-key" { algorithm hmac-md5; secret "这里拷贝/etc/rndc.key里的内容"; }; controls { inet * port 953 allow { any; } keys { "rndc-key"; }; }; listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; allow-query { any; }; forwarders {114.114.114.114;};
5:添加新域名,配置/etc/named.rfc1912.zones,添加以下代码
zone "fm20.cn" IN { type master; file "fm20.cn.zone"; allow-update { none; }; };
6:创建A记录与CNAME记录,新增文件/var/named/fm20.cn.zone
$TTL 1
@ IN SOA localhost. root(1 1 1 1 1)
@ IN NS localhost.
@ IN A 127.0.0.1
www IN A 127.0.0.1
* IN CNAME www
飞儿传媒www.firadio.com