注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

SanTT's Box

Working notes and some private diary

 
 
 

日志

 
 
关于我

有点懒....有点呆.....兴趣丰富.....三分热度....

网易考拉推荐

私人DNS简列配置  

2011-12-26 18:12:55|  分类: Linux System |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

闲来无事自己又重新做了个apache简单折腾了下DNS

重新梳理下,发现了好多以前没有注意的细节。有重新学习了下

下面贴一下我的各个步骤与配置文件

环境:centos  6.1

yum install bind,bind-devel    (or  bind*更全点吧)

在6.1下好像取消了之前的版本有的caching,chroot

配置文件:

/etc/name.conf

options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory  "/var/named";
dump-file  "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

 allow-query     { any; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "."  IN {

                  type hint;

                  file "named.ca";

};
 include "/etc/named.rfc1912.zones";
};

/etc/named.rfc1912.zones

zone "xxx.com"   IN   {

              type master;

              file "/etc/named/xxx.com.zone";

              allow-update   {   none;  };

};

zone  "1.168.192.in-addr.arpa"  IN {

               type  master;

               file  "/etc/named/192.168.1.zone";

               allow-update   { none; };

}

 

cp     /var/named/named.localhost    /etc/named/xxx.come.zone

cp     /var/named/named.loopback    /etc/named/192.168.1.zone

 

xxx.com.zone

$TTL  1D

@                 IN              SOA          xxx.com.         root       (

                                                                                             0           ;  serial

                                                                                             1D         ;  refresh

                                                                                             1H         ;  retry

                                                                                             1W        ;  expire

                                                                                             3H )       ;  minimum

                  NS            xxx.com.

                  A              127.0.0.1

www           A               192.168.1.x

 

192.168.1.zone

$TTL  1D

@                 IN              SOA          xxx.com.         root.santt.com.       (

                                                                                             0           ;  serial

                                                                                             1D         ;  refresh

                                                                                             1H         ;  retry

                                                                                             1W        ;  expire

                                                                                             3H )       ;  minimum

                  NS            xxx.com.

192.168.1.x      PTR          xxx.com

 

四个配置文件配好就能启服务了。service named start   检查是否报错。OK就行了。

 

最后提示下echo "192.168.1.x      www.xxx.com" >>/etc/hosts

                 echo "nameserver      192.168.1.x">>/etc/resolv.conf

  评论这张
 
阅读(259)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017