广杰博客

  • 首页
  • IT资讯
  • IT运维
  1. 首页
  2. IT运维
  3. 正文

linux下bind域名dns服务器安装配置

02/16/2012 1623点热度 0人点赞 0条评论

linux下bind域名dns服务器安装配置

一、从bind官网网站下载http://www.bind.com/pub/bind9/ 进行安装

[root@redhat soft]# tar zxvf bind-9.9.0rc2.tar.gz
[root@redhat soft]# cd bind-9.9.0rc2
[root@redhat bind-9.9.0rc2]# ./configure --prefix=/usr/local/bind
[root@redhat bind-9.9.0rc2]# nake
[root@redhat bind-9.9.0rc2]# nake install

二、.生成rndc控制命令的key文件

[root@redhat bind-9.9.0rc2]# cd /usr/local/bind
[root@redhat bind]#sbin/rndc-confgen >./etc/rndc.conf

从rndc.conf文件中提取named.conf用的key

[root@redhat etc]# tail -10 rndc.conf|head -9 >named.conf

把9行前面的#去掉

三、配置域名解析文件
1.编辑named.conf

[root@redhat etc]# vi named.conf
key "rndc-key" {
algorithm hmac-md5;
secret "TEmKGmOBXeK/LfV3+MfGIQ==";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
options {
directory "/usr/local/bind/etc";
allow-query{ any;};
};
zone "." IN{
type hint;
file "named.root";
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "locahost.rev";
allow-update {none;};
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update {none;};
};
zone "test.com" IN {
type master;
file "test.com.zone";
};

2.建立named.root,该文件可以从ftp://ftp.rs.internic.net/domain/named.root下载
3.建立localhost.zone文件
[root@redhat etc]# vi localhost.zone

$TTL 86400
@ IN SOA localhost. root.localhost. (
42 ; Serial
3600 ; Refresh
900 ; Retry
3600000 ; Expire
3600 ) ; Minimum
IN NS localhost.
localhost IN A 127.0.0.1

3.建立localhost.rev文件
[root@redhat etc]# vi localhost.rev

@ IN SOA localhost. root.localhost. (
2008022103 ; Serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
1 IN PTR localhost

4.建立test.com.zone文件。
[root@redhat etc]# vi test.com.zone

@ IN SOA test.com. root.test.com. (
2008022102 ; Serial
3600 ; Refresh
900 ; Retry
3600000 ; Expire
3600 ) ; Minimum
IN NS ns1.test.com.
ns1 IN A 192.168.0.222
www IN A 192.168.0.111

5.测试dns解析

[root@redhat etc]# nslookup
> set type=any
> localhost
Server: 192.168.0.222
Address: 192.168.0.222#53

localhost
origin = localhost
mail addr = root.localhost
serial = 42
refresh = 3600
retry = 900
expire = 3600000
minimum = 3600
localhost nameserver = localhost.localhost.
> test.com
Server: 192.168.0.222
Address: 192.168.0.222#53

test.com
origin = test.com
mail addr = root.test.com
serial = 2008022102
refresh = 3600
retry = 900
expire = 3600000
minimum = 3600
test.com nameserver = ns1.test.com.
>

 

[root@redhat etc]# ping www.test.com

PING www.test.com (192.168.0.111) 56(84) bytes of data.

 

标签: bind配置 linux下bind安装配置
最后更新:02/16/2012

guangjie

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论
最新 热点 随机
最新 热点 随机
Red Hat Enterprise Linux 9 发布,大量组件升级 windows10 家庭版添加hyper-v虚拟机组件 Red Hat Enterprise Linux 8.5 GA 发布 Rocky Linux 8.4 GA正式版发布下载 Rocky Linux 8.3 首个候选版本发布 CentOS 8.3 (2011) ISO镜像下载发布 CentOS Linux 落幕 CentOS Stream 上位 CentOS Linux 7.9 (2009) iso镜像下载 Windows 10 2020年10月更新ISO下载 ubuntu ssh通过密钥登陆服务器
Red Hat Enterprise Linux 9 发布,大量组件升级windows10 家庭版添加hyper-v虚拟机组件
查看mssql版本号命令 mysql最大连接数修改的方法 桌面路径修改 清除Linux系统上的蠕虫程序Ramen windows环境下mysql数据库的主从同步备份 解决winlogon.exe和csrss.exe进程占用cpu高 关于resin的jvm内存调整设置 Framework3.0正式版本分发包 windows下jdk,tomcat的环境变量设置 linux下squid反向代理的安装配置
标签聚合
redhat nginx php_curl Windows Server 2012 linux springboot Windows Server 2012下载 Hyper-V
友情链接
  • linux运维
  • 郑州SEO

COPYRIGHT © 2021 gjie.cn. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备07002435号-8