Chinaunix

标题: DNS配置文件问题?能帮我看一下吗?谢谢! [打印本页]

作者: tenglongfly    时间: 2005-02-21 11:00
标题: DNS配置文件问题?能帮我看一下吗?谢谢!
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)
                                                                                                               
                                                                                                               

请问我的配置文件哪里出错了?谢谢!
作者: 網中人    时间: 2005-02-21 21:44
标题: DNS配置文件问题?能帮我看一下吗?谢谢!
Feb 21 07:21:16.806 couldn't open pid file '/var/run/named/named.pid': Permission denied
作者: Tony_J    时间: 2005-02-22 12:19
标题: DNS配置文件问题?能帮我看一下吗?谢谢!
使用nslookup命令
作者: tomyung    时间: 2005-02-22 18:50
标题: DNS配置文件问题?能帮我看一下吗?谢谢!
楼主配置文件一团糟。。。
作者: tenglongfly    时间: 2005-02-23 16:22
标题: DNS配置文件问题?能帮我看一下吗?谢谢!
问题解决了主要是
@ IN SOA server.example.com. root.server.example.com

@ IN SOA @ root.localhost
这两句错了,谢谢大家!!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2