免费注册 查看新帖 |

Chinaunix

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

dns bind 9.4的安装和配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-23 08:35 |只看该作者 |倒序浏览

1 下载bind-9.4.0.tar.gz后解开,cd bind-9.4
2 配置编译
  ./configure --prefix=/usr --sysconfdir=/etc --enable-threads --disable-openssl-version-check ;make;make install

3 生成rndc.conf和rndc.key:
/usr/sbin/rndc-confgen >/etc/rndc.conf
tail -10 /etc/rndc.conf| head -9 | sed s/#\ //g >/etc/rndc.key
生成根文件记录:dig @a.root-servers.net . NS >named.ca
4 生成named.conf :
options {
        directory "/var/named/data";
        dump-file "/var/named/data/dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        version "fuck you";
        pid-file "/var/run/named/named.pid";
        listen-on {125.64.32.137;};
        recursion yes;
        recursive-clients 1000000;
         };
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndc-key; };
};
include "/etc/rndc.key";
logging {
    channel warning
      {
         file "/var/log/dns_warnings" versions 3 size 20m;  
         severity warning;
         print-category yes;
         print-severity yes;
         print-time yes;
      };
   channel general_dns
      {
         file "/var/log/dns_logs" versions 3 size 20m;  
         severity info;
         print-category yes;
         print-severity yes;
         print-time yes;
      };
   channel query_log {
        file "/var/log/dns-query.log" versions 3 size 20m;
        severity debug;
        print-time yes;
        print-severity yes;
                      };
   channel  dynamic
      {
         file "/var/log/dnsalllogs" versions 3 size 20m;
         severity dynamic;
         print-category yes;
         print-severity yes;
         print-time yes;
      };
       category default { warning; } ;
       category queries { dynamic; } ;
       category queries { general_dns; } ;
       category queries { query_log; };
        };
zone "." IN {
        type hint;
        file "/var/named/named.ca";
5 调试启动named : named -u named -gc /etc/named.conf
  没有出错就ok
6 正式启动named : named -u named -c /etc/named.conf &



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12502/showart_284085.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP