免费注册 查看新帖 |

Chinaunix

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

[DNS] FreeBSD 7.2里设定DNS [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-20 13:15 |只看该作者 |倒序浏览
请问 named.conf里默认的设定如下..

options {
        // Relative to the chroot directory, if any
        directory       "/etc/namedb";
        pid-file        "/var/run/named/pid";
        dump-file       "/var/dump/named_dump.db";
        statistics-file "/var/stats/named.stats";



我做了部分设定后重启named.conf 提示:
xxx# /etc/rc.d/named restart
named not running? (check /var/run/named/pid).
dev changed
        user expected 53 found 0 modified
Starting named.


请问要如何修改才能让named正常启动呢?

谢谢.

论坛徽章:
0
2 [报告]
发表于 2009-08-21 07:58 |只看该作者
用调试模式启动named,问题在那里一目了然

# named -gc /path/named.conf

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
3 [报告]
发表于 2009-08-21 08:27 |只看该作者
看后台日志

或者用楼上版主说的调试模式启动

论坛徽章:
0
4 [报告]
发表于 2009-08-21 16:43 |只看该作者
$ named -gc /var/named/etc/namedb/named.conf
21-Aug-2009 01:41:07.245 starting BIND 9.4.3-P2 -gc /var/named/etc/namedb/named.conf
21-Aug-2009 01:41:07.245 found 2 CPUs, using 2 worker threads
21-Aug-2009 01:41:07.246 using up to 4096 sockets
21-Aug-2009 01:41:07.252 loading configuration from '/var/named/etc/namedb/named.conf'
21-Aug-2009 01:41:07.255 using default UDP/IPv4 port range: [49152, 65535]
21-Aug-2009 01:41:07.256 using default UDP/IPv6 port range: [49152, 65535]
21-Aug-2009 01:41:07.257 listening on IPv4 interface bge0, 192.168.0.14#53
21-Aug-2009 01:41:07.258 could not listen on UDP socket: permission denied
21-Aug-2009 01:41:07.258 creating IPv4 interface bge0 failed; interface ignored
21-Aug-2009 01:41:07.258 listening on IPv4 interface lo0, 127.0.0.1#53
21-Aug-2009 01:41:07.258 could not listen on UDP socket: permission denied
21-Aug-2009 01:41:07.258 creating IPv4 interface lo0 failed; interface ignored
21-Aug-2009 01:41:07.258 not listening on any interfaces
21-Aug-2009 01:41:07.260 zone '168.192.in-addr.arpa' allows updates by IP address, which is insecure
21-Aug-2009 01:41:07.260 zone '168.192.in-addr.arpa' allows updates by IP address, which is insecure
21-Aug-2009 01:41:07.272 /var/named/etc/namedb/named.conf:91: couldn't add command channel 127.0.0.1#953: permission denied
21-Aug-2009 01:41:07.272 the working directory is not writable
21-Aug-2009 01:41:07.272 ignoring config file logging statement due to -g option
21-Aug-2009 01:41:07.273 couldn't open pid file '/var/run/named/pid': File exists
21-Aug-2009 01:41:07.273 exiting (due to early fatal error)
$


记录如上,
应该还是存在别的问题吧?

论坛徽章:
0
5 [报告]
发表于 2009-08-21 17:58 |只看该作者
用ROOT登录调试。

论坛徽章:
0
6 [报告]
发表于 2009-08-25 15:28 |只看该作者
以下是用root执行后的结果, 请看下.  谢谢.

x14# named -gc /var/named/etc/namedb/named.conf
25-Aug-2009 00:25:32.325 starting BIND 9.4.3-P2 -gc /var/named/etc/namedb/named.conf
25-Aug-2009 00:25:32.325 found 2 CPUs, using 2 worker threads
25-Aug-2009 00:25:32.325 using up to 4096 sockets
25-Aug-2009 00:25:32.332 loading configuration from '/var/named/etc/namedb/named.conf'
25-Aug-2009 00:25:32.335 using default UDP/IPv4 port range: [49152, 65535]
25-Aug-2009 00:25:32.335 using default UDP/IPv6 port range: [49152, 65535]
25-Aug-2009 00:25:32.337 listening on IPv4 interface bge0, 192.168.0.14#53
25-Aug-2009 00:25:32.337 could not listen on UDP socket: address in use
25-Aug-2009 00:25:32.337 creating IPv4 interface bge0 failed; interface ignored
25-Aug-2009 00:25:32.337 listening on IPv4 interface lo0, 127.0.0.1#53
25-Aug-2009 00:25:32.337 could not listen on UDP socket: address in use
25-Aug-2009 00:25:32.338 creating IPv4 interface lo0 failed; interface ignored
25-Aug-2009 00:25:32.338 not listening on any interfaces
25-Aug-2009 00:25:32.340 zone '168.192.in-addr.arpa' allows updates by IP address, which is insecure
25-Aug-2009 00:25:32.340 zone '168.192.in-addr.arpa' allows updates by IP address, which is insecure
25-Aug-2009 00:25:32.352 /var/named/etc/namedb/named.conf:91: couldn't add command channel 127.0.0.1#953: address in use
25-Aug-2009 00:25:32.352 ignoring config file logging statement due to -g option
25-Aug-2009 00:25:32.353 additionally listening on IPv4 interface bge0, 192.168.0.14#53
25-Aug-2009 00:25:32.353 could not listen on UDP socket: address in use
25-Aug-2009 00:25:32.353 creating IPv4 interface bge0 failed; interface ignored
25-Aug-2009 00:25:32.353 additionally listening on IPv4 interface lo0, 127.0.0.1#53
25-Aug-2009 00:25:32.353 could not listen on UDP socket: address in use
25-Aug-2009 00:25:32.353 creating IPv4 interface lo0 failed; interface ignored
25-Aug-2009 00:25:32.354 zone 0.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.354 zone 10.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.354 zone 127.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.355 zone 254.169.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.355 zone 16.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.355 zone 17.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.355 zone 18.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.355 zone 19.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.356 zone 20.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.356 zone 21.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.356 zone 22.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.356 zone 23.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.357 zone 24.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.357 zone 25.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.357 zone 26.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.357 zone 27.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.358 zone 28.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.358 zone 29.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.358 zone 30.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.358 zone 31.172.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.358 zone 2.0.192.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.359 zone 168.192.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.359 zone 18.198.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.359 zone 19.198.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.359 zone 240.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.360 zone 241.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.360 zone 242.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.360 zone 243.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.360 zone 244.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.361 zone 245.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.361 zone 246.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.361 zone 247.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.361 zone 248.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.362 zone 249.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.362 zone 250.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.362 zone 251.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.362 zone 252.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.362 zone 253.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.363 zone 254.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.363 zone 255.in-addr.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.363 zone 0.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.363 zone 1.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.364 zone 3.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.364 zone 4.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.364 zone 5.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.364 zone 6.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.365 zone 7.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.365 zone 8.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.365 zone 9.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.365 zone a.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.365 zone b.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.366 zone c.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.366 zone d.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.366 zone e.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.366 zone 0.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.367 zone 1.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.367 zone 2.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.367 zone 3.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.367 zone 4.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.368 zone 5.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.368 zone 6.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.368 zone 7.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.368 zone 8.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.368 zone 9.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.369 zone a.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.369 zone b.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.369 zone c.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.369 zone d.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.370 zone 0.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.370 zone 1.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.370 zone 2.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.370 zone 3.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.371 zone 4.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.371 zone 5.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.371 zone 6.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.371 zone 7.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.371 zone 8.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.372 zone 9.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.372 zone a.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.372 zone b.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.372 zone c.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.373 zone d.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.373 zone e.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.373 zone f.e.f.ip6.arpa/IN: loaded serial 42
25-Aug-2009 00:25:32.374 zone qd-huanhai.com/IN: loaded serial 2008082000
25-Aug-2009 00:25:32.374 zone ip6.int/IN: loaded serial 42
25-Aug-2009 00:25:32.374 zone localhost/IN: loaded serial 42
25-Aug-2009 00:25:32.376 running
25-Aug-2009 00:25:32.376 zone qd-huanhai.com/IN: sending notifies (serial 2008082000)

屏幕总是停在这个状态,我按ctrl+c后多了如下几行.

25-Aug-2009 00:25:32.374 zone qd-huanhai.com/IN: loaded serial 2008082000
25-Aug-2009 00:25:32.374 zone ip6.int/IN: loaded serial 42
25-Aug-2009 00:25:32.374 zone localhost/IN: loaded serial 42
25-Aug-2009 00:25:32.376 running
25-Aug-2009 00:25:32.376 zone qd-huanhai.com/IN: sending notifies (serial 2008082000)
^C25-Aug-2009 00:54:06.035 shutting down
25-Aug-2009 00:54:06.048 exiting
x14#

[ 本帖最后由 unix3er 于 2009-8-25 15:58 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2009-08-25 16:00 |只看该作者
25-Aug-2009 00:25:32.337 could not listen on UDP socket: address in use

先把正在运行的named进程关了再运行。

论坛徽章:
0
8 [报告]
发表于 2009-08-26 08:55 |只看该作者
谢谢.

好像问题还有不少.请看下面:

$ named -gc /var/named/etc/namedb/named.conf
25-Aug-2009 17:51:52.076 starting BIND 9.4.3-P2 -gc /var/named/etc/namedb/named.conf
25-Aug-2009 17:51:52.076 found 2 CPUs, using 2 worker threads
25-Aug-2009 17:51:52.076 using up to 4096 sockets
25-Aug-2009 17:51:52.083 loading configuration from '/var/named/etc/namedb/named.conf'
25-Aug-2009 17:51:52.086 using default UDP/IPv4 port range: [49152, 65535]
25-Aug-2009 17:51:52.086 using default UDP/IPv6 port range: [49152, 65535]
25-Aug-2009 17:51:52.088 listening on IPv4 interface bge0, 192.168.0.14#53
25-Aug-2009 17:51:52.089 could not listen on UDP socket: permission denied
25-Aug-2009 17:51:52.089 creating IPv4 interface bge0 failed; interface ignored
25-Aug-2009 17:51:52.089 listening on IPv4 interface lo0, 127.0.0.1#53
25-Aug-2009 17:51:52.089 could not listen on UDP socket: permission denied
25-Aug-2009 17:51:52.089 creating IPv4 interface lo0 failed; interface ignored
25-Aug-2009 17:51:52.089 not listening on any interfaces
25-Aug-2009 17:51:52.091 zone '168.192.in-addr.arpa' allows updates by IP address, which is insecure
25-Aug-2009 17:51:52.091 zone '168.192.in-addr.arpa' allows updates by IP address, which is insecure
25-Aug-2009 17:51:52.103 /var/named/etc/namedb/named.conf:91: couldn't add command channel 127.0.0.1#953: permission denied
25-Aug-2009 17:51:52.103 the working directory is not writable
25-Aug-2009 17:51:52.103 ignoring config file logging statement due to -g option
25-Aug-2009 17:51:52.103 couldn't open pid file '/var/run/named/pid': Permission denied
25-Aug-2009 17:51:52.103 exiting (due to early fatal error)
$

论坛徽章:
0
9 [报告]
发表于 2009-08-26 12:23 |只看该作者
调试模式

论坛徽章:
0
10 [报告]
发表于 2009-08-26 14:49 |只看该作者
是啊.

我的配置有问题,通过调试模式来看看问题在那里.

这些log看不懂该如何处理.所以上来请教.

我也修改过文件的权限,还是不行.

[ 本帖最后由 unix3er 于 2009-8-26 16:02 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP