当前位置:操作系统 > Unix/Linux >>

BIND9快速安装实例

这是一个服务器安装的一部分;

  由于论坛吃空格,准备了txt文件在这里:

  http://www.hackerbay.com/doc/bind9.txt

  [code:1:3f69c81bf9]######################## BIND 9 ###############

  # 简单的bind 9 安装

  # 配置为 转发 + master ###

  阿土 Aborigen Yin

  http://www.hackerbay.com

  2003.06.27

  ###################### modules bind 9 #############33

  7.安装bind 9.2.2

  7.1.获得源码并安装

  mkdir -p /usr/local/src/distfiles

  cd /usr/local/src/distfiles

  #wget ftp://ftp.isc.org/isc/bind9/9.2.2/bind-9.2.2.tar.gz

  wget ftp://172.16.100.245/pub/distfiles/bind-9.2.2.tar.gz

  tar xfz bind-9.2.2.tar.gz -C ..

  cd ../bind-9.2.2/

  ./configure --prefix=/usr/local/modules/named --disable-ipv6

  make && make install

  7.2.add user and group for named

  pw groupadd named

  mkdir -p /usr/local/modules/named/etc

  mkdir -p /usr/local/modules/named/var/log

  mkdir -p /usr/local/modules/named/var/run

  pw useradd named -g named -d /usr/local/modules/named -s /sbin/nologin

  chown -R named:named /usr/local/modules/named

  chmod 700 /usr/local/modules/named

  chmod 777 /usr/local/modules/named/var/run

  7.3.配置DNS服务器

  cd /usr/local/modules/named/etc

  #vi named.conf

  //begin of named.conf

  acl "trust-lan" { 127.0.0.1/8; 192.168.0.0/16; 172.16.0.0/16; };

  options {

  directory "/usr/local/modules/named/etc";

  datasize 80M;

  allow-transfer {

  "trust-lan";

  };

  forward first;

  forwarders {

  202.96.134.133;

  202.96.128.110;

  };

  //recursion no;

  recursion yes;

  allow-notify {

  "trust-lan";

  };

  allow-recursion {

  "trust-lan";

  };

  //auth-nxdomain yes;

  auth-nxdomain no;

  #不报告自己的版本号

  version "[secured]";

  };

  // How to log

  logging {

  channel warning

  {

  file "/usr/local/modules/named/var/log/dns_warnings" versions 3 size 10240k;

  severity warning;

  print-category yes;

  print-severity yes;

  print-time yes;

  };

  channel general_dns

  {

  file "/usr/local/modules/named/var/log/dns_logs" versions 3 size 10240k;

  severity info;

  print-category yes;

  print-severity yes;

  print-time yes;

  };

  category default { warning; } ;

  category queries { general_dns; } ;

  };

  zone "." {

  type hint;

  file "named.root";

  };

  zone "0.0.127.IN-ADDR.ARPA" {

  type master;

  file "localhost.rev";

  };

  zone "oss4e.org"{

  type master;

  file "zone.oss4e.org";

  notify yes;

  };

  zone "100.16.172.in-addr.arpa" {

  type master;

  file "zone.100.16.172.in-addr.arpa";

  };

  //end of named.conf

  touch /usr/local/modules/named/var/log/dns_warnings

  touch /usr/local/modules/named/var/log/dns_logs

  #获得根提示文件

  wget ftp://ftp.internic.org/domain/named.root

  #vi named.root

  ; This file holds the information on root name servers needed to

  ; initialize cache of Internet domain name servers

  ; (e.g. reference this file in the "cache . <file>"

  ; configuration file of BIND domain name servers).

  ;

  ; This file is made available by InterNIC

  ; under anonymous FTP as

  ; file /domain/named.root

  ; on server FTP.INTERNIC.NET

  ;

  ; last update: Nov 5, 2002

  ; related version of root zone: 2002110501

  ;

  ;

  ; formerly NS.INTERNIC.NET

  ;

  . 3600000 IN NS A.ROOT-SERVERS.NET.

  A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4

  ;

  ; formerly NS1.ISI.EDU

  ;

  . 3600000 NS B.ROOT-SERVERS.NET.

  B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107

  ;

  ; formerly C.PSI.NET

  ;

  . 3600000 NS C.ROOT-SERVERS.NET.

  C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12

  ;

  ; formerly TERP.UMD.EDU

  ;

  . 3600000 NS D.ROOT-SERVERS.NET.

  D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90

  ;

  ; formerly NS.NASA.GOV

  ;

  . 3600000 NS E.ROOT-SERVERS.NET.

  E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10

  ;

  ; formerly NS.ISC.ORG

  ;

  . 3600000 NS F.ROOT-SERVERS.NET.

  F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241

  ;

  ; formerly NS.NIC.DDN.MIL

  ;

  . 3600000 NS G.ROOT-SERVERS.NET.

  G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4

  ;

  ; formerly AOS.ARL.ARMY.MIL

  ;

  . 3600000 NS H.ROOT-SERVERS.NET.

  H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53

  ;

  ; formerly NIC.NORDU.NET

  ;

  . 3600000 NS I.ROOT-SERVERS.NET.

  I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17

  ;

  ; operated by VeriSign, Inc.

  ;

  . 3600000 NS J.ROOT-SERVERS.NET.

  J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30

  ;

  ; housed in LINX, operated by RIPE NCC

  ;

  . 3600000 NS K.ROOT-SERVERS.NET.

  K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129

  ;

  ; operated by IANA

  ;

  . 3600000 NS L.ROOT-SERVERS.NET.

  L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12

  ;

  ; housed in Japan, operated by WIDE

  ;

  . 3600000 NS M.ROOT-SERVERS.NET.

  M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33

  ; End of File

  ;vi zone.oss4e.org

  ;begin of zone.oss4e.org

  $TTL 3600

  @ IN SOA dns1.oss4e.org. webmaster.oss4e.org. (

  12061702 ; Serial (date, 2 digits version of day)

  86400 ; refresh (1 day)

  7200 ; retry (2 hours)

 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,