Chinaunix首页 | 论坛 | 博客
  • 博客访问: 212444
  • 博文数量: 33
  • 博客积分: 813
  • 博客等级: 军士长
  • 技术积分: 377
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-17 15:37
文章分类

全部博文(33)

文章存档

2012年(33)

我的朋友

分类: LINUX

2012-02-21 18:55:42

客户端IP:192.168.17.10
客户端主机名:rtpserver01.test.com
DNS Server IP:192.168.17.9
 
一、检查软件安装
blade10:~ # rpm -qa|grep bind
bind-libs-9.5.0P2-20.1
bind-utils-9.5.0P2-20.1
bind-libs-32bit-9.5.0P2-20.1
...
二、检查bind包(package)所对应的相关文件和目录
blade10:~ # rpm -ql bind
/etc/init.d/named
/etc/named.conf      #DNS主要配置文件
......
三、启动/停止DNS
blade10:/software # /etc/init.d/named 或  # rcnamed
第一次启动后,自动生成/var/lib/named/etc/named.conf
开机自动启动DNS:blade10:/software # chkconfig named on
四、配置/etc/named.conf文件
blade10:/software # cat /etc/named.conf
....
# localhost while the third defines the reverse lookup for localhost.
...
###新增如下内容,需要解析的主机的domain###
zone "test.com" in {
        type master;
        file "test.com";
};
zone "17.168.192.in-addr.arpa" in {
        type master;
        file "192.168.17.zone";
};
###新增内容结束###
五、创建并配置步骤四中在named.conf文件中指定的两个file
blade10:/var/lib/named # pwd
/var/lib/named
blade10:/var/lib/named # cat test.com
$TTL 1W
test.com.       IN SOA host.com.     root (
               42      ; serial (d. adams)
               2D      ; refresh
               4H      ; retry
               6W      ; expiry
               1W )        ; minimum
       IN NS       test.com. 
       IN A        192.168.17.10
dns             IN A            192.168.17.10 
www             IN A            192.168.17.10
rtpserver01     IN A     192.168.17.10 #对应主机名rtpserver01.test.com
vi              IN CNAME       rtpserver01.test.com.
blade10:/var/lib/named # cat 192.168.17.zone
$TTL 1W
@       IN SOA      test.com.   root.localhost. (
               42      ; serial (d. adams)
               2D      ; refresh
               4H      ; retry
               6W      ; expiry
               1W )        ; minimum
       IN NS       test.com.
10     IN PTR      rtpserver01.test.com.
六、客户端配置
配置或者添加/etc/resolv.conf文件,添加一行:
nameserver 192.168.3.89
阅读(12773) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~