dns安装及配置

Bind9服务安装文档

V1.0.0








文档历史

版本

日期

作者

修改历史

1.0

20120528

Xu xiaowei

新建文档



目录
1. 概述
2. 安装环境
3. 安装bind9
4. 测试

概述

Bind9 服务搭建

安装环境

OS: DEBIAN
IP地址:172.24.147.66
域名:staging.tom.com
bind9
dnsutils

安装BIND9

  1. 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

你可能感兴趣的:(dns,安装及配置)