Solaris DNS安装和配置( 三 )



case "$1" in
start)
echo -n "Starting dns server..."
loadproc /usr/sbin/named


stop)
echo -n "Stopping dns server..."
/usr/sbin/rndc stop
evaluate_retval


reload)
echo -n "Reloading dns server..."
/usr/sbin/rndc reload
evaluate_retval


restart)
$0 stop
/usr/sbin/sleep 1
$0 start


status)
/usr/sbin/rndc status
evalute_retval


*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1


esac

# End /etc/init.d/


b) Create the links

cd /etc/rc0.d
ln -s ../init.d/named K600named
cd /etc/rc1.d
ln -s ../init.d/named K600named
cd /etc/rc6.d
ln -s ../init.d/named K600named
cd /etc/rc3.d
ln -s ../init.d/named S300named
cd /etc/rc5.d
ln -s ../init.d/named S300named


--------------------------
6) Edit /etc/resolv.conf so it use your dns server

search zerezo.org
nameserver 192.168.0.51


--------------------------
6) Test your configuration

Some tests :
dig -x 127.0.0.1

if you have a ftp server :
ftp ftp.zerezo.org
ftp zarba.zerezo.org

if you have apache, launch your browser and use as url :
http://www.zerezo.org
http://zarba.zerezo.org

If problems, look at the logs /var/log/dns* and /var/log/sys.log

推荐阅读