1安装
首先是os的选择,我选择了最简单使用的ubuntu,或者debian都是可以的
root@netfs:/etc/bind#uname-a
Linuxnetfs2.6.22-14-server#1SMPSunOct1423:34:23GMT2007i686GNU/Linux
安装过程
root@netfs:~#apt-getinstallbind9
Readingpackagelists...Done
Buildingdependencytree
Readingstateinformation...Done
bind9isalreadythenewestversion.
0upgraded,0newlyinstalled,0toremoveand15notupgraded.
root@netfs:~#
2设置
设置主dns,修改/etc/bind/name.conf.local文件
root@netfs:/etc/bind#nanonamed.conf.local
zone"apt-get.cn"{
typemaster;
file"/etc/bind/apt-get.cn.hosts";
};
设置dns的转发
root@netfs:/etc/bind#nanonamed.conf.options
把下面的这一段加到最后面的};的前面,别加到后面了,呵呵加到了后面了以后你的bind9就启动不了哦
forwarders{
202.103.0.117port53;
202.103.24.68port53;
};
forwardfirst;
设置数据文件
root@netfs:/etc/bind#nanoapt-get.cn.hosts
$ttl38400//默认的活动时间
apt-get.cn.INSOAnetfs.lcnja.qq.com.(
1199613019
10800//刷新时间
3600//传输重试时间
604800//过期时间
38400)//默认活动时间
apt-get.cn.INNSnetfs.//定义一个命名服务器注意后面的点不能丢//NS纪录nameserver
web.apt-get.cn.INA192.168.1.66//定义一个地址纪录名称web.apt-get.cn.//A纪录address
下载本文示例代码
阅读(235) | 评论(0) | 转发(0) |