免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1556 | 回复: 4
打印 上一主题 下一主题

[DNS] DNS配置文件问题?能帮我看一下吗?谢谢! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-02-21 11:00 |只看该作者 |倒序浏览
Vi /etc/named.conf
/ generated by named-bootconf.pl
//
// a caching only nameserver config
//
options {
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
        directory "/var/named";
};
zone "." {
        type hint;
        file "named.ca";
};
zone "localhost" {
        type master;
        file "localhost.zone";
};
zone "1.0.127.in-addr.arpa" {
        type master;
        file "named.local";
};
zone "0.168.192.in-addr.arpa" {
        type master;
        file "0.168.192.in-arpa.zone";
};
zone "example.com" {
                                                                                             1,7          顶端
        type master;
        file "example.com.zone";
};
include  "/etc/rndc.key";

vi /etc/resolv.conf
domain example.com
nameserver 192.168.0.2

vi /var/named/0.0.127.in-addr.arpa.zone
$TTL 86400
IN SOA localhost. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
                                                                                                               
@ IN NS localhost.
                                                                                                               
2 IN PTR localhost.


vi /var/named/ 0.168.192.in-arpa.zone
$TTL 86400
@       IN      SOA     server.example.com.     root.server.example.com (
                                5 ; serial
                                28800 ; refresh
                                14400 ; retry
                                3600000 ; expire
                                86400 ; ttl
                                )
                                                                                                               
                                                                                                               
                                                                                                               
192.168.0.2     IN      NS      server.example.com.
192.168.0.2     IN      PTR      server.example.com.
Vi /var/named/ example.com.zone
$TTL 86400
@       IN      SOA     server.example.com.     root.server.example.com.        (
                                33 ; serial
                                28800 ; refresh
                                14400 ; retry
                                3600000 ; expire
                                86400 ; ttl
                                )
                                                                                                               
                                                                                                               
                                                                                                               
@       IN      NS      server.example.com.
                                                                                                               
chen.example.com.       IN      A       192.168.0.1
server.exaple.com.      IN      A       192.168.0.2

vi /var/named
$TTL 86400
@       IN      SOA     @       root.localhost  (
                                54 ; serial
                                10800 ; refresh
                                900 ; retry
                                604800 ; expire
                                86400 ; ttl
                                )
                                                                                                               
                                                                                                               
                                                                                                               
        IN      NS      localhost.
                                                                                                               
        IN      A       127.0.0.1

[root@server named]# named -g
Feb 21 07:21:16.768 starting BIND 9.2.2 -g
Feb 21 07:21:16.769 using 1 CPU
Feb 21 07:21:16.774 loading configuration from '/etc/named.conf'
Feb 21 07:21:16.799 no IPv6 interfaces found
Feb 21 07:21:16.800 listening on IPv4 interface lo, 127.0.0.1#53
Feb 21 07:21:16.800 binding TCP socket: address in use
Feb 21 07:21:16.801 listening on IPv4 interface eth0, 192.168.0.2#53
Feb 21 07:21:16.801 binding TCP socket: address in use
Feb 21 07:21:16.806 couldn't add command channel 127.0.0.1#953: address in use
Feb 21 07:21:16.806 ignoring config file logging statement due to -g option
Feb 21 07:21:16.806 couldn't open pid file '/var/run/named/named.pid': Permission denied
Feb 21 07:21:16.806 exiting (due to early fatal error)
                                                                                                               
                                                                                                               

请问我的配置文件哪里出错了?谢谢!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2005-02-21 21:44 |只看该作者

DNS配置文件问题?能帮我看一下吗?谢谢!

Feb 21 07:21:16.806 couldn't open pid file '/var/run/named/named.pid': Permission denied

论坛徽章:
0
3 [报告]
发表于 2005-02-22 12:19 |只看该作者

DNS配置文件问题?能帮我看一下吗?谢谢!

使用nslookup命令

论坛徽章:
0
4 [报告]
发表于 2005-02-22 18:50 |只看该作者

DNS配置文件问题?能帮我看一下吗?谢谢!

楼主配置文件一团糟。。。

论坛徽章:
0
5 [报告]
发表于 2005-02-23 16:22 |只看该作者

DNS配置文件问题?能帮我看一下吗?谢谢!

问题解决了主要是
@ IN SOA server.example.com. root.server.example.com

@ IN SOA @ root.localhost
这两句错了,谢谢大家!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP