linux rhel5 DNS Ïê½â5
£¨Æߣ©DNS·þÎñÆ÷ÅäÖÃʵÀý
¾ÙÀýÒ»£º
ʹÓÃviewÓï¾ä´î½¨¾ßÓÐÄÚÍâÊÓͼ¹¦ÄܵÄDNS·þÎñÆ÷£¬²¢Äܹ»¸ù駲»Í¬µÄ¿Í»§¶ËµØַʵÏÖ²»Í¬µÄ½âÎö½á¹û£¬¼ÙÉè¾ÖÓòÍøµØַΪ192.168.255.0/24£¬¾ÖÓòÍøÄÚ¸÷Ö÷»ú·Ö±ðΪrhel1:192.168.255.128; rhel2:192.168.255.12; rhel3:192.168.255.129; rhel4:192.168.255.120; rhel5:192.168.255.4Ϊ´ÓDNS·þÎñÆ÷£»ÒÔ¼°Ò»¸öÌṩDNS·þÎñµÄÖ÷»ú£¨Ö÷»úÃû£ºdns,¾ÖÓòÍøÄÚIPµØÖ·£º192.168.255.3,ÍâÍøIPµØÖ·£º101.25.67.89£©;´ËÍ⻹ÓÐÈý¸öÓ¦Ó÷þÎñÆ÷£ºwww·þÎñÆ÷£¨Ö÷»úÃû£ºwww£»IPµØÖ·£º101.25.67.5£©,Óʼþ·þÎñÆ÷£¨Ö÷»úÃû£ºmail;IPµØÖ·£º101.25.67.2£©,FTP·þÎñÆ÷£¨Ö÷»úÃû£ºftp;IPµØÖ·£º101.25.67.1£©,ҪʵÏֵŦÄÜÊÇ£º¾ÖÓòÍøÄÚµÄÖ÷»ú¿ÉÒÔ½âÎöµ½ÍâÍø£»ÍâÍøÓû§¿ÉÒÔ½âÎöµ½ÄÚÍøµÄWWW·þÎñÆ÷£¬Óʼþ·þÎñÆ÷ºÍFTP·þÎñÆ÷£¬µ«²»¿ÉÒÔ½âÎöµ½¾ÖÓòÍøÄÚµÄÖ÷»ú£»²»ÔÊÐíÍâÍøÓû§·´Ïò½âÎöÄÚÍøµØÖ·£¬²»ÔÊÐíÍâÍøÓû§²ÉÓõݹé²éѯ·½Ê½Ê¹ÓøÃDNS·þÎñÆ÷¡£ÅäÖò½ÖèÈçÏ£º
£¨1£©Ðè°²×°ÒÔÏÂÁ½¸öÈí¼þ°ü£º
#rpm –ivh bind-9.3.3-7.el5.i386.rpm(µÚ¶þÕŹâÅÌ) £» #rpm –ivh bind-chroot-9.3.3-7.el5.i386.rpm(µÚ¶þÕŹâÅÌ)
£¨2£©±à¼/var/named/chroot/etc/named.confÎļþÄÚÈÝÈçÏ£º
(´ËÎļþÐèÓû§×Ô¼º´´½¨,¿É´Ó/usr/share/doc/bind-9.3.3/sample/etcÖи´ÖƵ½/var/named/chroot/etc/Ŀ¼ÏÂ,²¢ÔÚ/etc/Ï´´½¨Ò»¸öÁ´½Ó)
option {
directory “/var/named”; //ĬÈÏ·¾¶
dump-file “/var/named/data/cache_dump.db”;
startistice-file “/var/named/data/named_stats.txt0”;
};
acl “my lan” { //´´½¨Ò»¸ö·ÃÎÊ¿ØÖÆÁÐ±í£¬ÆäÖÐ127.0.0.1ÊDZ¾»ú£¬192.168.255.0/24±íʾ±¾µØ¾ÖÓòÍø
127.0.0.1; 192.168.255.0/24; //µØÖ·Áбí¿ÉÒÔÓÃany , none , localnets , localhost
}; //any:ÈκÎÖ÷»ú£»none:²»Æ¥ÅäÈ
Ïà¹ØÎĵµ£º
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
Linux
·¢ÐаæÓë
Linux
²úÆ·Á½ÕßÏà²îºÜ´ó£¬ÓÐʱÈÝÒ×»ìÏý£¬·¢ÉúÎó½â£¬ÉõÖÁÒªÄÖ³ö´óЦ»°À´¡£ÎªÊ²Ã´£¿
´Ó×ÖÃæÉÏÀ´½²£¬·¢Ðа棨
Distribution
£©ºÍ²úÆ ......
ʹÓÃselectº¯Êý¿ÉÒÔÒÔ·Ç×èÈûµÄ·½Ê½ºÍ¶à¸ösocketͨÐÅ¡£³ÌÐòÖ»ÊÇÑÝʾselectº¯ÊýµÄʹÓ㬹¦Äܷdz£¼òµ¥£¬¼´Ê¹Ä³¸öÁ¬½Ó¹Ø±ÕÒÔºóÒ²²»»áÐ޸ĵ±Ç°Á¬½ÓÊý£¬Á¬½ÓÊý´ïµ½×î´óÖµºó»áÖÕÖ¹³ÌÐò¡£
1. ³ÌÐòʹÓÃÁËÒ»¸öÊý×éfd_A£¬Í¨ÐÅ¿ªÊ¼ºó°ÑÐèҪͨÐŵĶà¸ösocketÃèÊö·û¶¼·ÅÈë´ËÊý×é¡£
2. Ê×ÏÈÉú³ÉÒ»¸ö½Ðsock_fdµÄsocketÃèÊö·û£¬ÓÃÓÚ¼àÌý¶Ë¿ ......
slab·ÖÅäÆ÷ÐÎÏóµØ˵¾ÍÊÇÏÈÓÉ»ï°é»úÖÆÉêÇë¿ÕÏÐÄÚ´æ¿Õ¼ä£¬È»ºóslab·ÖÅäÆ÷ÔÙ°ÑÕâ¸öÄÚ´æ¿Õ¼ä½øÐзָ°´Í¬Ñù´óСÀ´½øÐзָ×îºóÔÙÓÃһЩÊý¾Ý½á¹¹À´½øÐйÜÀí¡£ÉÏÃæÖ»ÊÇÐÎÏóµØ˵·¨¡£ÎÒÃÇƽʱ°ÑÓÉslab½øÐзָîºóµÄÄÚ´æÎÒÃdzÆ֮Ϊ¸ßËÙ»º´æÄÚ´æ¡£ÕâÑù¿´À´¾ÍÖªµÀËùνµÄ¸ßËÙ¾ÍÊÇ˵²»ÊÇÿ´Î·ÖÅäºÍÊÍ·ÅÄڴ涼ҪÕÒ»ï°é»úÖÆ£¬¿ÉÒ ......
Ï̳߳أº¼òµ¥µØ˵£¬Ïß³Ì³Ø ¾ÍÊÇÔ¤ÏÈ´´½¨ºÃÒ»ÅúỊ̈߳¬·½±ã¡¢¿ìËٵش¦ÀíÊÕµ½µÄÒµÎñ¡£±ÈÆð´«Í³µÄµ½À´Ò»¸öÈÎÎñ£¬¼´Ê±´´½¨Ò»¸öÏß³ÌÀ´´¦Àí£¬½ÚÊ¡ÁËÏ̵߳Ĵ´½¨ºÍ»ØÊյĿªÏú£¬ÏìÓ¦¸ü¿ì£¬Ð§Âʸü¸ß¡£
ÔÚlinuxÖУ¬Ê¹ÓõÄÊÇposixÏ߳̿⣬Ê×ÏȽéÉܼ¸¸ö³£Óõĺ¯Êý£º
1 Ï̵߳Ĵ´½¨ºÍÈ¡Ïûº¯Êý
pthread_create
´´½¨Ïß³Ì
pthread_join
º ......
RHEL5´î½¨DNS·þÎñÆ÷ʵÏÖÃû³Æ½âÎö Èý
£¨¶þ£©named.confÎļþ˵Ã÷£º
´ËÎļþÐèÓû§×Ô¼º´´½¨£¬¿É´Ó/usr/share/doc/bind-9.3.3/sample/etcÖи´ÖƵ½/var/named/chroot/etc/Ŀ¼ÏÂ
// Sample named.conf BIND DNS server 'named' configuration file
// for the Red Hat BIND distribution.
// See the BIND ......