Chinaunix首页 | 论坛 | 博客
  • 博客访问: 144921
  • 博文数量: 39
  • 博客积分: 2020
  • 博客等级: 大尉
  • 技术积分: 281
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-10 11:24
文章分类

全部博文(39)

文章存档

2010年(39)

我的朋友

分类:

2010-09-30 12:26:26

1.Extract install file.
tar zxvf bind-9.7.0.tar.gz
2.Change work directory.
cd bind-9.7.0
3.Config,compile and install.
./configure --prefix=/usr/local/named --enable-threads #--enable-threads
make
su
make install
4.Create key file for rndc command.
cd /usr/local/named
sbin/rndc-confgen > etc/rndc.conf
5.Get the key from rndc.conf for named.conf.
cd /etc
tail -10 rndc.conf | head -9 | sed s/#\ //g > named.conf
6.Create Zone file directory.
mkdir /var/named
cd /var/named
7.Create Zone files.
8.Config /etc/named.conf.
options {
        directory "/var/named";
};

key "rndc-key" {
        algorithm hmac-md5;
        secret "xmIhTyX+JTbIYVfvFiRWtg==";
};

controls {
        inet 127.0.0.1 port 953
                allow { 127.0.0.1; } keys { "rndc-key"; };
};

logging {
  channel my_file {
      file "/var/named/log.msgs";
      severity dynamic;
      print-category yes;
      print-severity yes;
      print-time yes;
  };
  category default { my_file; };
  category queries { my_file; };

};

zone "movie.edu" in {
         type master;
         file "db.movie.edu";
};


zone "249.249.192.in-addr.arpa" in {
         type master;
         file "db.192.249.249";
};

zone "253.253.192.in-addr.arpa" in {
         type master;
         file "db.192.253.253";
};

zone "0.0.127.in-addr.arpa" in {
         type master;
         file "db.127.0.0";
};

zone "." in {
         type hint;
         file "db.cache";
};

9.Start bind.
/usr/local/named/sbin/named -c /etc/named.conf
10.Start log trace.
rndc status
rndc trace
11.Test DNS.
host localhost
host 127.0.0.1
12.Check logs.
cat /var/named/log.msgs
阅读(511) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~