背景:
阅读新闻
CentOS 5.6 x86 64 下搭建DNS服务器
[日期:2012-06-03] 来源:Linux社区 作者:navyaijm [字体:]
一、安装
# yum install -y bind bind-chroot ypbind bind-utils
# rpm -qa |grep bind
bind-libs-9.3.6-16.P1.el5
bind-utils-9.3.6-16.P1.el5
ypbind-1.19-12.el5_6.1
bind-9.3.6-16.P1.el5
bind-chroot-9.3.6-16.P1.el5
# yum install -y caching-nameserver-9.3.* //安装后可启动named
# service named start
# netstat -antup //TCP 53\953端口开放,953提供给rndc工具用来管理DNS服务器
二、
1.主区域配置
# cd /var/named/chroot/etc //以下操作均在此路径下
# cp -p named.caching-nameserver.conf named.conf //注意加 -p 所属组不变
# cp -p named.rfc1912.zones named.rfc1912.zones_back
# vim named.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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
### 结束 ###
# vim named.rfc1912.zones
### 配置内容如下:
zone "." IN {
type hint;
file "named.ca";
};
zone "laowafang.com" IN {
type master;
file "linuxidc.com.zone";
allow-update { none; };
};
zone "146.147.119.in-addr.arpa" IN {
type master;
file "linuxidc.com.local";
allow-update { none; };
};
### 结束 ###
相关资讯 CentOS教程
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯