免费注册 查看新帖 |

Chinaunix

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

大家帮我分析一下我错在哪里。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-02 10:51 |只看该作者 |倒序浏览
这全是网站照着写的。但是不知道为什么不能解析
[root@linux named]# nslookup
Note:  nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead.  Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> www.zlhgo.com
Server:         192.168.0.106
Address:        192.168.0.106#53

** server can't find www.zlhgo.com: SERVFAIL


[root@linux named]# cat zlhgo.com.zone
$TTL 86400
@         IN SOA www.zlhgo.com. root.zlhgo.com. (  
                      42         ; Serial(d.adams)
                      3H         ; refresh
                      15M        ; retry  
                      1W         ; expire
                      1D )       ; minimum
          IN NS www.zlhgo.com.
@         IN MX 10 mail.zlhgo.com.
localhost IN A 127.0.0.1
www       IN A 192.168.0.106
mail      IN A 192.168.0.106
pop3      IN A 192.168.0.106
smtp      IN A 192.168.0.106


[root@linux named]# cat /etc/named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named/";
        /*
         * 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;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "zlhgo.com" IN {
        type master;
        file "zlhgo.com.zone";
};

include "/etc/rndc.key";

论坛徽章:
0
2 [报告]
发表于 2007-02-02 11:07 |只看该作者
$TTL 86400
@         IN SOA  ns.zlhgo.com. root.zlhgo.com. (  
                      42         ; Serial(d.adams)
                      3H         ; refresh
                      15M        ; retry  
                      1W         ; expire
                      1D )       ; minimum
          IN   NS zlhgo.com.
www    IN A 192.168.0.106
mail      IN A 192.168.0.106
pop3      IN A 192.168.0.106
smtp      IN A 192.168.0.106

论坛徽章:
0
3 [报告]
发表于 2007-02-02 11:14 |只看该作者
这么大哥用给小弟详细说一下吗?
谢谢。在线等你

你的意思是不是把
@         IN MX 10 mail.zlhgo.com.
前面那一个@去掉
我第一次去没有加这个@也不行。后来我看有的人加了。我加上去还是不行的

论坛徽章:
0
4 [报告]
发表于 2007-02-02 11:23 |只看该作者
你把我上面的文字COPY到你文件力。。重启服务。。试下。。。DNS这个东西。。需要先看看配置文档比较好,起码自己知道每行的意思。。自己在做什么。

论坛徽章:
0
5 [报告]
发表于 2007-02-02 11:32 |只看该作者
大哥。测试的时候。还是返回一样的信息。
大哥。帮我再想想别的方法,谢谢
我也不知道为是什么问题。我的防火墙都关了的

论坛徽章:
0
6 [报告]
发表于 2007-02-02 12:46 |只看该作者
把日志贴出来。。。。。

论坛徽章:
0
7 [报告]
发表于 2007-02-02 21:19 |只看该作者
[root@linux named]# vi zlhgo.com.zone
$TTL 86400
@         IN SOA mail.zlhgo.com. root.zlhgo.com. (  
                      42         ; Serial(d.adams)
                      3H         ; refresh
                      15M        ; retry  
                      1W         ; expire
                      1D )       ; minimum
@          IN NS mail.zlhgo.com.
mail       IN A 192.168.0.106
www       IN CNAME mail
pop3      IN CNAME mail
smtp      IN CNAME mail
mail      IN MX 10   mail.zlhgo.com.

[root@linux named]# vi /etc/named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named/";
        /*
         * 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;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "zlhgo.com" IN {
        type master;
        file "zlhgo.com.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};



include "/etc/rndc.key";

试试看,如有错误,请指教。

论坛徽章:
0
8 [报告]
发表于 2007-02-04 13:11 |只看该作者

要学会看系统日志

先重新启动dns   /etc/rc.d/init.d/named restart
然后查看系统日志
tail -n 12 /var/log/messages
找出问题所在,再具体问题具体解决

论坛徽章:
0
9 [报告]
发表于 2007-02-05 15:06 |只看该作者
[root@linux root]# tail -n 12 /var/log/messages
Feb  5 02:15:47 linux named[1728]: exiting
Feb  5 15:15:47 linux named:  succeeded
Feb  5 02:15:49 linux named[1982]: starting BIND 9.2.2-P3 -u named -t /var/named/chroot
Feb  5 02:15:49 linux named[1982]: using 1 CPU
Feb  5 02:15:49 linux named[1982]: loading configuration from '/etc/named.conf'
Feb  5 15:15:49 linux named: named 启动 succeeded
Feb  5 02:15:49 linux named[1982]: no IPv6 interfaces found
Feb  5 02:15:49 linux named[1982]: listening on IPv4 interface lo, 127.0.0.1#53
Feb  5 02:15:49 linux named[1982]: listening on IPv4 interface eth0, 192.168.0.106#53
Feb  5 02:15:49 linux named[1982]: command channel listening on 127.0.0.1#953
Feb  5 02:15:49 linux named[1982]: zone zlhgo.com/IN: loading master file zlhgo.com.zone: file not found
Feb  5 02:15:49 linux named[1982]: running

不好意思,各位大哥。因为我在公司上网。星期六星期天休息。希望名位继续帮帮忙。我要先把DNS学会。然后再学做邮件服务器。谢谢各位

论坛徽章:
0
10 [报告]
发表于 2007-02-05 15:10 |只看该作者
小桂桂 哥哥
我试了还是一样的不行
我的系统是FC1家里的那台也是这个系统。测试的时候还是一样的错

我用nslookup
测试localhost也不行。错误的意思好像是连接超时
谢谢各位哥哥,姐姐们
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP