码迷,mamicode.com
首页 > 其他好文 > 详细

centos7 dns安装记录

时间:2014-12-19 12:20:47      阅读:526      评论:0      收藏:0      [点我收藏+]

标签:centos7 dns

yum install -y bind bind-chroot bind-util bind-libs

vi /etc/named.conf

listen-on port 53 { 192.168.100.10; };

allow-query     { any; };

zone "sleeper.com" IN {

type master;

file "zone.sleeper.com";

};

zone "100.168.192.in-addr.arpa" IN {

type master;

file "zone.192.168.100";

};

cd /var/named(注:在/etc/named.conf中有directory "/var/named";项,区域文件内容位置要和这里相符,不然启动named服务会报错

正向解析区域

vi zone.sleeper.com

$TTL 86400

@ IN SOA dc002.sleeper.com. zwj9152.arcsoft.com.cn.(

001

1D

1H

1W

3H)

IN NS dc002.sleeper.com.

dc002 IN A 192.168.100.20

dc001 IN A 192.168.100.10

反向解析区域

vi zone.192.168.100

$TTL 86400

@ IN SOA dc002.sleeper.com. zwj9152.arcsoft.com.cn.(

001

1D

1H

1W

3H)

IN NS dc002.sleeper.com.

20 IN PTR dc002.sleeper.com.

10 IN PTR dc001.sleeper.com.


修改NDS服务器地址:

vi /etc/resolv.conf

nameserver 192.168.100.20


测试

[root@dc002 named]# nslookup dc001.sleeper.com

Server: 192.168.100.20

Address: 192.168.100.20#53


Name: dc001.sleeper.com

Address: 192.168.100.10


centos7 dns安装记录

标签:centos7 dns

原文地址:http://sleeper.blog.51cto.com/4561333/1591648

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!