bin 安装,v-bind( 四 )


* 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; };
};www.2cto.com
zone "domain1.net" IN { //新加domain1.net的域
type master;
file "domain1.net.zone";
allow-update { none; };
};
zone "252.177.61.in-addr.arpa" IN { //新加域的反向解析
type master;
file "named.61.177.252";
allow-update { none; };
};
include "/etc/rndc.key";
12.创建/var/named目录
# mkdir /var/named
# cd /var/named
13.匿名登录到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.1
15.创建named.local文件
# vi named.local
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serialwww.2cto.com
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
16.创建domain1.net.zone文件
# vi ycmail.net.zone
$TTL 86400
@ IN SOA localhost. root.localhost. (
2003061800 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
mail IN A 61.177.252.34
www IN CNAME mail
17.创建named.61.177.252文件
# vi named.61.177.252
$TTL 86400
@ IN SOA localhost. root.localhost. (
2003061800 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
34 IN PTR mail.domain1.net.
18.创建启动脚本
# vi /etc/rc.d/init.d/named
#!/bin/shwww.2cto.com
#
# named This shell script takes care of starting and stopping
# named (BIND DNS server).
#
# chkconfig: 345 55 45
# description: named (BIND) is a Domain Name Server (DNS)
# that is used to resolve host names to IP addresses.
# probe: true
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ $ = "no" ] && exit 0
[ -f /usr/sbin/named ] || exit 0
[ -f /etc/named.conf ] || exit 0
# See how we were called.
case "" in
start)
# Start daemons.
echo -n "Starting named: "
daemon named
echo
touch /var/lock/subsys/named
;;
stop)
# Stop daemons.
echo -n "Shutting down named: "
killproc named
rm -f /var/lock/subsys/named
echowww.2cto.com
;;
status)
/usr/sbin/rndc status
exit $?
;;
restart)
stop
start
exit $?
;;
reload)
/usr/sbin/rndc reload
exit $?
;;
probe)
# named knows how to reload intelligently; we dont want linuxconf
# to offer to restart every time