º¸Åë ÀÌÀü¿¡ rpmÀ̳ª ±âŸ ´Ù¸¥°ÍÀ¸·Î ¼³Ä¡µÇ¾î Àִ°ÍÀÌ ÀÖ´Ù¸é Á¦°Å Çصµ ÁÁ½À´Ï´Ù. RedHatÀ» »ç¿ëÇÏ´Â Linux¶ó¸é bind, bind-utils, bind-devel, caching-nameserverÀÌ ¼³Ä¡µÇ¾î ÀÖÀ»°ÍÀÔ´Ï´Ù. /etc/rc.d/init.d/named ½ºÅ©¸³Æ®°¡ ÀÖ´Ù¸é Áö¿ì±âÀü¿¡ º¸°üÇϴ°ÍÀÌ ÁÁÀ»°ÍÀÔ´Ï´Ù.
This is the easy part :-). /usr/local/sbin/named µ¥¸óÀ» ½Ç¼ö ¹æÁö¸¦ À§ÇØ ±ÇÇÑÀ» 000ÁÝ´Ï´Ù. #chmod 000 /usr/local/sbin/named
named daemon ÈÀÏ°ú named-xfer(zone trandfer¸¦ À§ÇÑ ÈÀÏ)À» º¸Åë º¹»ç ÇÕ´Ï´Ù.
# cp src/bin/named/named /chroot/named/bin # cp src/bin/named-xfer/named-xfer /chroot/named/bin
º¸Åë RedHat 6.0 system¿¡¼´Â ´ÙÀ½°ú °°½À´Ï´Ù. -u ´Â ½ÇÇàµÈ ÈÄ¿¡ ³×Àμ¹öÀÇ º¯°æµÉ »ç¿ëÀÚ ID¸¦ ¸»ÇÕ´Ï´Ù. -g ´Â ½ÇÇàµÈ ÈÄ¿¡ ³×Àμ¹öÀÇ º¯°æµÉ »ç¿ëÀÚ group¸¦ ¸»ÇÕ´Ï´Ù. -t ´Â chroot¸¦ Àû¿ëÇÒ µð·ºÅ丮¸¦ ¸»ÇÕ´Ï´Ù. >>>>daemon /chroot/named/bin/named -u named -g named -t /chroot/named ¿øº»¿¡´Â À§¿Í °°¾ÒÀ¸³ª Àú´Â ¾Æ·¡°°ÀÌ ¼öÁ¤ÇÏ¿´½À´Ï´Ù. >>>>daemon /chroot/named/bin/named -u nobody -g nobody -t /chroot/named
¾Æ·¡ ½ºÅ©¸³Æ®´Â /etc/rc.d/init.d/named ¿¡ ÀúÀå ÇÕ´Ï´Ù.
#!/bin/sh # #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. [ ${NETWORKING} = "no" ] && exit 0 [ -f /chroot/named/bin/named ] || exit 0 [ -f /chroot/named/etc/named.conf ] || exit 0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting named: " daemon /chroot/named/bin/named -u named -g named -t /chroot/named echo touch /var/lock/subsys/named ;; stop) # Stop daemons. echo -n "Shutting down named: " killproc named rm -f /var/lock/subsys/named echo ;; status) /usr/local/sbin/ndc status exit $? ;; restart) /usr/local/sbin/ndc restart exit $? ;; reload) /usr/local/sbin/ndc reload exit $? ;; probe) # named knows how to reload intelligently; we don't want linuxconf # to offer to restart every time /usr/local/sbin/ndc reload >/dev/null 2>&1 || echo start exit 0 ;; *) echo "Usage: named {start|stop|status|restart}" exit 1 esac exit 0
named.conf ¿¡ Àû¿ëµÈ ¼³Á¤ ¸î°³¸¦ º¯°æÇØ¾ß ÇÒÁöµµ ¸ð¸¨´Ï´Ù. º¯°æÇØ¾ß ÇҰ͵éÀº ¾Æ·¡¿¹µé µîÀÔ´Ï´Ù.
directory "/etc/namedb"; pid-file "/var/run/named.pid"; named-xfer "/bin/named-xfer";(%ÁÖÀÇ%) Àý´ë directory ¾È¿¡´Ù°¡ /chroot/named/etcÀ¸·Î ÀûÁö ¸¶½Ê½Ã¿ä /chroot°¡ /¶ó°í »ý°¢ÇϹǷΠÀ§¿¡ ¼³Á¤´ë·Î ÁøÇàÇÏ¿´´Ù¸é º¸Åë /etc/namedb ÀÌ·¸°Ô µÉ°Í ÀÔ´Ï´Ù.