bind9的安装

liu03241667

liu03241667

2016-01-29 18:05

bind9的安装,bind9的安装
安装步骤
1.先从 http://www.isc.org/products/BIND/ 下载bind,我下载的是bind-9.3.1.tar.gz2.我下载的文件放在/home/tomcat目录下3.进入目录解压缩#tar -xzfz bind-9.3.1.tar.gz -C /usr/local/src4.进入安装目录 # cd bind-9.3.15.配置、编译 # ./configure # make6.安装 # make install7.生成的可执行文件位于/usr/local/sbin目录下。最重要的可执行文件为named和rndc。8.创建链接 # ln -s /usr/local/sbin/rndc /usr/sbin/rndc # ln -s /usr/local/sbin/named /usr/sbin/named9.创建rndc.conf配置文件。 # /usr/local/sbin/rndc-confgen > /etc/rndc.conf # cat /etc/rndc.conf 输出为: # Start of rndc.conf key "rndc-key" { algorithm hmac-md5; secret "y9xvvfQjdWv9f/Fo7wquBg=="; }; options { default-key "rndc-key"; default-server 127.0.0.1; default-port 953; }; # End of rndc.conf # Use with the following in named.conf, adjusting the allow list as needed: # key "rndc-key" { # algorithm hmac-md5; # secret "y9xvvfQjdWv9f/Fo7wquBg=="; # }; # # controls { # inet 127.0.0.1 port 953 # allow { 127.0.0.1; } keys { "rndc-key"; }; # }; # End of named.conf10.创建rndc.key文件。将rndc.conf文件中注释部分拷贝生成如下文件: # vi /etc/rndc.key key "rndc-key" { algorithm hmac-md5; secret "y9xvvfQjdWv9f/Fo7wquBg=="; }; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; }; 检查rndc是否正常工作: #/usr/local/sbin/named -g Jan 11 11:56:45.075 starting BIND 9.2.3 -g Jan 11 11:56:45.076 using 1 CPU Jan 11 11:56:45.079 loading configuration from '/etc/named.conf' ...... #/usr/local/sbin/rndc status11.创建named.conf配置文件。# vi /etc/named.conf // generated by named-bootconf.pl options { directory "/var/named"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; }; // // a caching only nameserver config // zone "." IN { type hint; file "named.root"; }; zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; }; zone "0.0.127.in-addr.arpa" IN { type master; file "named.local"; allow-update { none; }; }; zone "duanfenglei.com" IN { //新加duanfenglei.com的域 type master; file "duanfenglei.com.zone"; allow-update { none; }; }; zone "9.168.192.in-addr.arpa" IN { //新加域的反向解析 type master; file "named.192.168.9"; allow-update { none; }; }; include "/etc/rndc.key";12.创建/var/named目录 # mkdir /var/named # cd /var/named13.匿名登录到ftp站点FTP.RS.INTERNIC.NET,获取/domain目录下的named.root文件和named.ca文件,将该文件置于/var/named目录下。14.创建localhost.zone文件# vi /var/named/localhost.zone $TTL 86400 $ORIGIN localhost. @ 1D IN SOA @ root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum 1D IN NS @ 1D IN A 127.0.0.115.创建named.local文件 # vi named.local $TTL 86400 @ IN SOA localhost. root.localhost. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS localhost. 1 IN PTR localhost.[root@linux etc]# mkdir /var/named进入/var/named[root@linux etc]# cd /var/named建立localhost.zone文件[root@linux named]#vi localhost.zone$TTL 86400$ORIGIN localhost.@ 1D IN SOA @ root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum 1D IN NS @ 1D IN A 127.0.0.1建立named.local文件[root@linux named]#vi named.local$TTL 86400@ IN SOA localhost. root.localhost. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 61.177.252 ; Expire 86400 ) ; Minimum IN NS localhost.1 IN PTR localhost.16.创建duanfenglei.com.zone文件 # vi duanfenglei.zone $TTL 1D@ IN SOA duanfenglei.com. root.duanfenglei.com. ( 1053891162 3H 15M 1W 1D ) IN NS duanfenglei.com. IN MX 5 duanfenglei.com.www IN A 192.168.9.917.创建named.192.168.9文件 # vi named.192.168.9 $TTL 86400@ IN SOA duanfenglei.com. root.duanfenglei.com.(20031001;7200;3600;43200;86400);@ IN NS duanfenglei.com.9 IN PTR dns.duanfenglei.com.18.启动#named -c /etc/named.conf &19.测试反向解析是否成功[root@testserver61 named]# host 192.168.9.99.9.168.192.in-addr.arpa domain name pointer dn
展开更多 50%)
分享

猜你喜欢

bind9的安装

Linux Linux命令 Linux安装 Linux编程 Linux桌面 Linux软件 Linux内核 Linux管理
bind9的安装

安装运行飞鸽传书时候提示 bind()错误=10048的完美解决方法

电脑网络
安装运行飞鸽传书时候提示 bind()错误=10048的完美解决方法

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

Linux指令篇:系统设置--bind

Linux Linux命令 Linux安装 Linux编程 Linux桌面 Linux软件 Linux内核 Linux管理
Linux指令篇:系统设置--bind

硬盘安装 RedHat9 心得

Linux Linux命令 Linux安装 Linux编程 Linux桌面 Linux软件 Linux内核 Linux管理
硬盘安装 RedHat9 心得

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

OriginPro9安装使用说明

电脑网络
OriginPro9安装使用说明

ie9无法安装怎么解决?

浏览器
ie9无法安装怎么解决?

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

用纯ASP代码实现图片上传并存入数据库中

用纯ASP代码实现图片上传并存入数据库中

Excel用函数让电脑排出无规律的数列

Excel用函数让电脑排出无规律的数列
下拉加载更多内容 ↓