3. 查看named进程运行是否正常
[root@SZH1 ~]# systemctl start named // 开启named进程
[root@SZH1 ~]# ps -eaf|grep named // 检查进程
[root@SZH1 ~]# netstat -nult|grep :53 // 检查监听端口
4. 添加正向解析
[root@SZH1 named]# cat szh.com_zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 192.168.110.230
AAAA ::1
ns A 192.168.110.230
vcenter A 192.168.110.231
[root@SZH1 named]# chown :named /var/named/szh.com_zone //授权 named 用户
[root@SZH1 named]# named-checkzone "szh.com" "/var/named/szh.com_zone" //检查区域文件是否正确
5. 添加反向解析
[root@SZH1 named]# cat 192.168.110.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 192.168.110.230
AAAA ::1
230 PTR ns.szh.com.
231 PTR vcenter.szh.com.
[root@SZH1 named]# chown :named /var/named/192.168.110.zone //授权 named 用户
[root@SZH1 named]# named-checkzone "110.168.192.in-addr.arpa" "/var/named/192.168.110.zone " //检查区域文件是否正确
6. 重启服务,检查dns是否生效
[root@SZH1 named]# systemctl restart named
[root@SZH1 named]# nslookup
> vcenter.szh.com
Server: 192.168.110.230
Address: 192.168.110.230#53
Name: vcenter.szh.com
Address: 192.168.110.231
------------------dns配置成功------------------