Bind9服務安裝文檔
V1.0.0
文檔歷史ide
版本測試 |
日期spa |
做者rest |
修改歷史server |
1.0dns |
20120528文檔 |
Xu xiaoweiget |
新建文檔域名 |
目錄
1. 概述
2. 安裝環境
3. 安裝bind9
4. 測試it
Bind9 服務搭建
OS: DEBIAN
IP地址:172.24.147.66
域名:staging.tom.com
bind9
dnsutils
apt-get install bind9
2. cp /etc/bind/named.conf -p /etc/bind/named.conf.bak
3. vi /etc/bind/named.conf
options {
directory "/var/cache/bind";
};
zone "staging.tom.com" in {
type master;
file "db.staging.tom";
};
zone "147.24.172.in-addr.arpa" in {
type master;
file "db.172.24.147";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};
zone "." in {
type hint;
file "db.cache";
};
4. cd /var/cache/bind
1). vi db.staging.tom
@ IN SOA staging.tom.com. root.staging.tom.com. (
200211131 ;
28800 ;
7200 ;
3600000 ;
86400 ) ;
NS staging.tom.com.
MX 10 staging.tom.com.
staging.tom.com. IN NS staging.tom.com.
staging.tom.com. IN A 172.24.147.66
*.staging.tom.com. IN A 172.24.147.66
2). vi db.127.0.0
@ IN SOA staging.tom.com root.staging.tom.com. (
200211131 ;
28800 ;
7200 ;
3600000 ;
86400 ) ;
IN NS staging.tom.com.
66 IN PTR localhost.
3). vi db.172.24.207
@ IN SOA staging.tom.com root.staging.tom.com. (
200211131 ;
28800 ;
7200 ;
3600000 ;
86400 ) ;
IN NS staging.tom.com.
66 PTR staging.tom.com.
66 PTR *.staging.tom.com.
4). cp /etc/bind/db.root /var/cache/bind/db.cache
5. /etc/init.d/bind9 restart
1. vi /etc/hosts
127.0.0.1 localhost
172.24.147.66 staging.tom.com
2. vi /etc/resolv.conf
search staging.tom.com
nameserver 172.24.147.66
3.apt-get install dnsutils
4.nslookup 111.staging.tom.com