Securing-Optimizing-RH-Linux-1_2_235
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
235
This tells the name server that it is a slave for the zone openarch.com and should track the
version of this zone that is being kept on the host 208.164.186.1.
A slave name server doesnt need to retrieve all of its database (db) files over the network
because these db files db.127.0.0 and db.cache are the same as on a primary master, so you
can keep a local copy of these files on the slave name server.
Copy the db.127.0.0 file from master name server to slave name server.
Copy the db.cache file from master name server to slave name server.
Configuration of the /etc/rc.d/init.d/named script file for all type of name server
Configure your /etc/rc.d/init.d/named script file to start and stop BIND/DNS daemons Server.
This configuration script file can by used for all type of name server (caching, master or slave).
Create the named script file (touch /etc/rc.d/init.d/named) and add:
#!/bin/sh
#
# named This shell script takes care of starting and stopping
# named (BIND DNS server).
#
# chkconfig: - 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.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/sbin/named ] || exit 0
[ -f /etc/named.conf ] || exit 0
RETVAL=0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting named: "
daemon named
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
echo
;;
stop)
# Stop daemons.
echo -n "Shutting down named: "
killproc named
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
echo
;;