PowerDNS
Contents
PowerDNS BV <pdns@powerdns.com>
It is a book about a Spanish guy called Manual. You should read it. -- Dilbert
1. µ¿Àû ³×ÀÓ¼¹ö PowerDNS ¶PowerDNSÀº ¿©·¯°¡Áö ¹é¿£µå¸¦ Áö¿øÇÏ´Â ´Ù¾çÇÑ ±â´ÉÀÇ ³×ÀÓ¼¹öÀÔ´Ï´Ù.
¹é¿£µå´Â ÀÏ¹Ý ÅؽºÆ® ÆÄÀÏÀ̰ųª ±× ¿ÜÀÇ µ¿ÀûÀÎ °ÍÀÏ ¼ö ÀÖ½À´Ï´Ù. ÀûÀýÇÑ ¿¹´Â °ü°èÇü µ¥ÀÌÅÍ º£À̽º, ·Îµå¹ë·±½Ì, Àå¾Öº¹±¸ ¾Ë°í¸®Áò µîÀ» Æ÷ÇÔÇÕ´Ï´Ù. ÇÁ·Î±×·¥À» ÀÛ¼ºÇÑ È¸»çÀÇ À̸§Àº PowerDNS BVÀÌ°í, ³×ÀÓ¼¹öÀÇ µ¥¸óÀÇ À̸§Àº PDNSÀÔ´Ï´Ù. 1.1. PDNSÀÇ ±â´É°ú ¼³°è ¶PDNS´Â ³×ÀÓ¼¹ö¸¸À» À§ÇØ ¸¸µé¾î Á³½À´Ï´Ù. PDNS´Â ¾Æ´Â µµ¸ÞÀο¡ ´ëÇؼ¸¸ ÀÀ´äÇÕ´Ï´Ù.
´Ù¸¥ µµ¸ÞÀο¡ ´ëÇؼ´Â ÀÀ´äÇÏÁö ¾Ê½À´Ï´Ù. PDNS-Recursor¸¦ »ç¿ë ÇÏ¸é °¡´ÉÇϳª º°µµÀÇ PDNS ¿Í´Â ´Ù¸¥ º°µµÀÇ µ¥¸óÀ¸·Î µ¿½Ã¿¡ °°Àº Æ÷Æ®·Î ¼ºñ½º´Â ÇÒ¼ö ¾ø½À´Ï´Ù.
PDNS´Â µ¥ÀÌÅͺ£À̽º¸¦ »ç¿ëÇØ ÀÀ´äÇϱ⠶§¹®¿¡, ¹ÏÀ» ¼ö ÀÖ½À´Ï´Ù. PDNS´Â ij½¬¿¡ ÀÇÇØ À߸øµÈ ÀÀ´äÀ» ÇÏ´Â ÀÏÀº ¾ø½À´Ï´Ù. PDNSÀÇ µðÀÚÀÎ ¸ñÇ¥´Â ½¬¿î ¼³Á¤À» ÅëÇÑ ÀÛÀº Å©±â¿Í ¸¹Àº ¼öÀÇ µµ¸ÞÀο¡ ´ëÇÑ Äõ¸®¿¡µµ ÀÀ´äÇÒ ¼ö ÀÖ°Ô ÇÏ´Â °ÍÀÔ´Ï´Ù. ´Ù¸¥ ÁÖ ¸ñÇ¥´Â º¸¾ÈÀÔ´Ï´Ù. PDNSÀÇ ÄÚµå´Â ¸Å¿ì ª°í °Ë»çÇϱ⠽±½À´Ï´Ù. °°Àº ¹æ½ÄÀ¸·Î ¶óÀ̺귯¸®´Â ¹öÆÛ¿À¹öÇ÷οìÀÇ À§ÇèÀÌ ÀûÀº °ÍÀ» »ç¿ëÇß½À´Ï´Ù. ¸¶Áö¸·À¸·Î, PDNS´Â °¡¿ë¼º°ú ÄÚµåÀÇ ¿À¿°¹®Á¦¸¦ À§ÇØ ¸¹Àº Åë°è¸¦ Á¦°øÇÕ´Ï´Ù. 1.4. º¸¾È ¶2003³â 1¿ù 8ÀÏ ÀÌÈÄ 2.9.4 ÀÌÈÄÀÇ ¹öÀü¿¡¼´Â ¾î¶² º¸¾È ¹®Á¦µµ ¹ß°ßµÇÁö ¾Ê¾Ò½À´Ï´Ù.
ÀÌÆäÀÌÁö´Â º¸¾È¹®Á¦°¡ ¹ß°ßµÉ¶§ ¾÷µ¥ÀÌÆ®µÉ °ÍÀÔ´Ï´Ù.
°øÁö´Â PowerDNSÀÇ ¸ðµç ¸ÞÀϸµ¸®½ºÆ®¿Í ¹ö±×Æ®·¡Å·À» ÅëÇØ ÀÌ·ç¾îÁý´Ï´Ù.
2.9ÀÌÀüÀÇ PowerDNS´Â ¿ÜºÎÀÇ DOS°ø°Ý¿¡ ´ëÇÑ Ãë¾àÁ¡À» °¡Áö°í ÀÖÀ¸¹Ç·Î, 2.9.4 ÀÌÈÄÀÇ ¹öÀüÀ¸·Î ¾÷±×·¹À̵å ÇϽñ⠹ٶø´Ï´Ù. º¸¾È¹®Á¦¿¡ ´ëÇØ ¾Ë·ÁÁÖ½Ç °ÍÀÌ ÀÖÀ¸¸é <powerdns@powerdns.com> ¿Í <ahu@ds9a.nl>·Î ¸ÞÀÏÀ» º¸³»Áֽñ⠹ٶø´Ï´Ù. ¿ì¸®´Â Rain Forest Puppy Full Disclosure Policy (RFPolicy) v2.0¸¦ ÁöÅ°°í ÀÖ½À´Ï´Ù. ´ç½Åµµ °°ÀÌ Çϱ⸦ ¹Ù¶ø´Ï´Ù. PowerDNS´Â GPLÀ» µû¸£°í ÀÖÀ½À» ±â¾ïÇϽñ⠹ٶø´Ï´Ù. PowerDNS´Â ¾î¶² º¸Áõµµ ÇÏÁö ¾Ê½À´Ï´Ù. ÀÌ ¶óÀ̼¾½º´Â ¹èÆ÷µÇ´Â ÇÁ·Î±×·¥¿¡µµ Æ÷ÇԵǾî ÀÖÀ¸¸ç ÀÌ ¹®¼¿¡µµ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. (Appendix E) 1.5. Acknowledgements ¶PowerDNS´Â ¾Æ·¡ÀÇ »ç¶÷/±â°ü ¿¡°Ô ¸¹Àº µµ¿òÀ» ¹Þ¾Ò½À´Ï´Ù :
(these people don't share the blame for any errors or mistakes in powerdns - those are all ours) 2. Installing on Unix ¶2.9 ÀÌ»óÀÇ ¹öÀüÀº ¼Ò½º³ª ÆÐÅ°Áö¸¦ ÅëÇÑ ¼³Ä¡¸¦ ÇÕ´Ï´Ù.
¿¹Àü ¹öÀüÀº ¹ÙÀ̳ʸ® ÀνºÅç·¯¸¦ »ç¿ëÇß½À´Ï´Ù.
2.1. ÀÌ ºÎºÐ¿¡¼ ÀϾ ¼ö ÀÖ´Â ¹®Á¦ ¶ÀÌ ºÎºÐ¿¡¼ ¿¡·¯°¡ ¹ß»ýÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀϹÝÀûÀÎ ¹®Á¦´Â ´ÙÀ½°ú °°Àº°Íµé ÀÔ´Ï´Ù.:
°øÀ¯¶óÀ̺귯¸®ÀÇ ·Îµù¿¡·¯ : libstdc++.so.x: cannot open shared object file: No such file or directory ÀÌ·± ¿¡·¯µéÀº PDNS ¹èÆ÷º»°ú ´ç½ÅÀÇ ½Ã½ºÅÛÀÌ ¸ÂÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ýÇÕ´Ï´Ù.
´ç½ÅÀÇ OS¿¡ ¸Â´Â Á¤Àû(static) PDNS ¹èÆ÷º»À» ¼³Ä¡ÇÏ°í ´Ù½Ã ½ÃµµÇØ º¸½Ê½Ã¿À.
¸¸¾à ½ÃµµÇÒ ¼ö ¾ø´Ù¸é <pdns@powerdns.com>·Î ¿¬¶ôÇϽñ⠹ٶø´Ï´Ù.
2.2. Å×½ºÆ® ¶¼³Ä¡°¡ ³¡³ª°í ¹é¿£µå ¼³Á¤À» Çϱâ Àü¿¡ ±âº»ÀûÀÎ Å×½ºÆ®¸¦ ÇÏ´Â °ÍÀÌ ÁÁ½À´Ï´Ù.
Å×½ºÆ®¸¦ À§ÇØ PowerDNS´Â example.com ¿¡ ´ëÇØ ¼³Á¤ÇÑ ¹ÙÀεå¹é¿£µå(bindbackend)¸¦ °¡Áö°í ÀÖ½À´Ï´Ù.
pdns.conf¿¡ ´ÙÀ½ÀÇ µÎ ÁÙÀ» Ãß°¡ ÇÕ´Ï´Ù:
launch=bind bind-example-zones ÀÌ ¼³Á¤Àº powerdns¸¦ ¹ÙÀεå¹é¿£µå·Î ½ÇÇà½ÃÅ°°í example¿¡ ´ëÇØ ÀÀ´äÇÏ°Ô ÇÕ´Ï´Ù.
Å×½ºÆ®¸¦ À§ÇØ PDNS¸¦ SysV init.d µð·ºÅ丮¿¡¼ ¸ð´ÏÅÍ ¸ðµå·Î ½ÃÀÛÇÕ´Ï´Ù : /etc/init.d/pdns monitor ¸ð´ÏÅÍ ¸ðµå¿¡¼, pdnsÇÁ·Î¼¼½º´Â Æ÷¾î±×¶ó¿îµå(foreground)·Î µ¿ÀÛÇÏ¸ç ¸ðµç »óȲÀ» Ãâ·ÂÇÕ´Ï´Ù. ¸¸¾à ¸ðµç°ÍÀÌ Á¦´ë·Î µ¿ÀÛÇÑ´Ù¸é, ´ÙÀ½°ú °°ÀÌ example.com µµ¸ÞÀο¡ ´ëÇÑ Äõ¸®¸¦ ½ÃµµÇÕ´Ï´Ù: host www.example.com 127.0.0.1 www.example.comÀÇ IP´Â 1.2.3.4·Î ³ª¿É´Ï´Ù. host ¸í·ÉÀº º¸Åë dnsutils ÆÐÅ°Áö¿¡ µé¾îÀÖ½À´Ï´Ù.
±× ¿ÜÀÇ ¸í·ÉÀ¸·Î dig www.example.com A @127.0.0.1 ¶Ç´Â nslookup www.example.com 127.0.0.1 °¡ ÀÖ½À´Ï´Ù.
2.2.1. ÀϹÝÀû ¿¡·¯µé ¶ÀÌ ÁöÁ¡¿¡¼ ¿¡·¯°¡ ¹ß»ýÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀϹÝÀûÀÎ ¿¡·¯´Â ´ÙÀ½°ú °°Àº °ÍµéÀÔ´Ï´Ù:
binding to UDP socket: Address already in use ÀÌ ¿¡·¯´Â ´Ù¸¥ ³×ÀÓ¼¹ö°¡ ÀÌ¹Ì 53¹ø Æ÷Æ®¸¦ »ç¿ëÇÏ°í ÀÖ´Ù´Â ¶æÀÔ´Ï´Ù.
ÇöÀç ±¸µ¿ÁßÀÎ ³×ÀÓ¼¹ö°¡ ÀÖ´Ù¸é ÁßÁö½ÃÅ°½Ê½Ã¿À. ±×°ÍÀÌ ¾î·Æ´Ù¸é
´Ù¸¥ Æ÷Æ®·Î PDNS¸¦ ±¸µ¿ÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
pdns.conf¿¡ local-port=5300¸¦ Ãß°¡ÇÏ°í ´Ù½Ã ½ÃµµÇØ º¸½Ê½Ã¿À.
ÇÏÁö¸¸, ´ëºÎºÐÀÇ DNSŬ¶óÀ̾ðÆ®´Â 53¹øÀ» ±âÁØÀ¸·Î µ¿ÀÛÇÕ´Ï´Ù.
binding to UDP socket: Permission denied
53¹ø Æ÷Æ®ÀÇ »ç¿ëÀº ¼öÆÛÀ¯Àú¸¸ °¡´ÉÇÕ´Ï´Ù.
¼öÆÛÀ¯Àú°¡ ¾Æ´Ï¶ó¸é PDNS¸¦ ´Ù¸¥ Æ÷Æ®·Î ±¸µ¿ÇØ¾ß ÇÕ´Ï´Ù.
pdns.conf¿¡ local-port=5300¸¦ Ãß°¡ÇÏ°í ´Ù½Ã ½ÃµµÇØ º¸½Ê½Ã¿À.
ÇÏÁö¸¸, ´ëºÎºÐÀÇ DNSŬ¶óÀ̾ðÆ®´Â 53¹øÀ» ±âÁØÀ¸·Î µ¿ÀÛÇÕ´Ï´Ù.
Unable to launch, no backends configured for querying
pdns.conf¿¡ launch=bind Ç׸ñÀ» Ãß°¡ ÇϽʽÿÀ.
Multiple IP addresses on your server, PDNS sending out answers on the
wrong one, Massive amounts of 'recvfrom gave error, ignoring: Connection
refused'
ÇÑ ÄÄÇ»ÅÍ¿¡¼ ¿©·¯°³ÀÇ IPÁÖ¼Ò¸¦ »ç¿ëÁßÀ̶ó¸é, UNIX´Â ÆÐŶÀ» ¹ÞÀº ÀÎÅÍÆäÀ̽º°¡ ¾Æ´Ñ
´Ù¸¥ ÀÎÅÍÆäÀ̽º·Î ÀÀ´äÀ» º¸³»´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù.
ÀÌ·± °æ¿ì¿¡´Â local-address¸¦ ½°Ç¥(,)·Î ÁöÁ¤µÈ ƯÁ¤ IPÁÖ¼Ò·Î ÁöÁ¤Çؼ »ç¿ëÇÕ´Ï´Ù.
µÎ¹ø° ¿¡·¯´Â IPÁÖ¼Ò¿Í ICMP¿¡·¯¿¡ ´ëÇÑ ÀÀ´ä¿¡ ¹ÝÀÀÇÏÁö ¾Ê´Â °æ¿ì¿¡ ¹ß»ýÇÕ´Ï´Ù.
2.3. À¯´Ð½º¿¡¼ PDNSÀÇ °¡µ¿ ¶PDNS´Â º¸Åë SysV-style init.d ½ºÅ©¸³Æ®·Î Á¦¾îµË´Ï´Ù.
init.d ½ºÅ©¸³Æ®´Â º¸Åë /etc/init.d ³ª /etc/rc.d/init.d ¿¡ ÀÖ½À´Ï´Ù.
»ç¿ëÇÒ ¼ö ÀÖ´Â Ä¿¸Çµå´Â ´ÙÀ½°ú °°½À´Ï´Ù: monitor ¸ð´ÏÅÍ´Â µ¥¸óÀ» º¸´Â Ưº°ÇÑ ¹æ¹ýÀÔ´Ï´Ù. PDNSµ¥¸óÀ» Æ÷±×¶ó¿îµå·Î ½ÇÇàÇؼ ·Î±×¸¦ Ãâ·ÂÇÏ°í,
½ÃÀ۽ÿ¡ ÀϾ´Â ¹®Á¦°¡ ¹«¾ùÀÎÁö ¾Ë ¼ö ÀÖ°Ô µµ¿ÍÁÝ´Ï´Ù. ¶ÇÇÑ, ·Î(raw) ÄÜÆ®·Ñ ¼ÒÄÏÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
µ¥¸ó°ú ¿ÜºÎÀÇ ¸ðµç Åë½ÅÀÌ ÀÌ ¼ÒÄÏÀ» »ç¿ëÇÕ´Ï´Ù.
ÇÏÁö¸¸, ÄÁÆ®·Ñ ÄܼÖÀº °ø½ÄÀûÀ¸·Î Á¦°øµÇ´Â °ÍÀº ¾Æ´Õ´Ï´Ù.
´ÙÀ½ÀÇ ¸í·ÉµéÀÌ »ç¿ë°¡´ÉÇÕ´Ï´Ù : QUIT, SHOW *, SHOW º¯¼öÀ̸§, RPING.
start
PDNS¸¦ ¹é±×¶ó¿îµå¿¡¼ ½ÃÀÛÇÕ´Ï´Ù. µ¥ÀÌÅͺ£À̽º ¿¬°á°°Àº °Í¿¡ ½Ã°£ÀÌ °É·Á¼
µ¥¸óÀ» ½ÇÇàÇϱâ±îÁö ÁöüµÉ ¼öµµ ÀÖ½À´Ï´Ù.
status ¸í·ÉÀ¸·Î Äõ¸®°¡ ¼º°øÇß´ÂÁö È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿©·¯¹ø start ¸í·ÉÀ» ³»¸®´õ¶óµµ
½ÇÇàÁßÀÎ PDNSÇÁ·Î¼¼½º°¡ ÀÖ´Ù¸é Ãß°¡·Î ½ÇÇàµÇÁö´Â ¾Ê½À´Ï´Ù.
restart
PDNS°¡ µ¿ÀÛÁßÀ̶ó¸é Àç½ÃÀÛÀ», ±×·¸Áö ¾Ê´Ù¸é ½ÃÀÛÇÕ´Ï´Ù.
status
PDNS »óŸ¦ º¾´Ï´Ï´Ù. ÇÁ·Î±×·¥ÀÌ ½ÃÀ۵Ǿú´ÂÁö È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
status´Â ÁÖ PDNS ÇÁ·Î¼¼½ºÀÇ PID¸¦ ¾Ë·ÁÁÝ´Ï´Ù.
stop
PDNS¸¦ Á¤Áö½Ãŵ´Ï´Ù. ÇÏÁö¸¸ Á¤Áö µÇ¾ú´ÂÁö È®ÀÎÇÏÁö´Â ¾Ê½À´Ï´Ù.
Á¤ÁöµÇ¾ú´ÂÁö È®ÀÎÇÏ·Á¸é status ¸í·ÉÀ» »ç¿ëÇϽʽÿÀ.
dump
PDNSµ¥¸óÀÇ »óȲÀ» º¸¿©ÁÖ´Â ¼öÄ¡¸¦ Ãâ·ÂÇØ ÁÝ´Ï´Ù.
show¸í·ÉÀ» ÅëÇØ Çϳª¾¿ È®ÀÎÇÏ´Â °Íµµ °¡´ÉÇÕ´Ï´Ù.
show º¯¼ö
dump¸í·É¿¡¼ Á¦°øµÇ´Â °Í°ú °°Àº ¼öÄ¡¸¦ ÁöÁ¤µÈ Çϳª¸¸ Ãâ·ÂÇØ ÁÝ´Ï´Ù.
mrtg
ÆÛÆ÷¸Õ½º ¸ð´ÏÅ͸µ¿¡ °üÇÑ °ÍÀº Chapter 6À» º¸½Ê½Ã¿À.
3. Installing on Microsoft Windows ¶ÁÖÀÇ PowerDNS´Â 1.99.12 ¹öÀüºÎÅÍ À©µµ¿ì¸¦ Áö¿øÇÏÁö¸¸, ÃÖ±ÙÀÌ°í ¾ÆÁ÷ º£Å¸»óÅÂÀÔ´Ï´Ù.
½Å·Ú¼ºÀ» À§ÇØ À¯´Ð½º ¹öÀüÀ» ÀÌ¿ëÇϴ°ÍÀ» ÃßõÇÕ´Ï´Ù. ´õºÒ¾î ODBC¹é¿£µå´Â
¸¶½ºÅÍ/½½·¹À̺긦 Áö¿øÇÏÁö ¾Ê½À´Ï´Ù. ¸¶½ºÅÍ/½½·¹À̺ê Áö¿øÀº Á¶¸¸°£ ÀÌ·ç¾îÁú °ÍÀÔ´Ï´Ù.
1.99.12ºÎÅÍ PowerDNS´Â À©µµ¿ì ÇÁ·Î±×·¥À¸·Î µ¿ÀÛÇÕ´Ï´Ù.
PDNS´Â NT service·Î µ¿ÀÛ°¡´ÉÇÏ°í ¸ðµç ODBCµå¶óÀ̹ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
PowerDNS¸¦ ¼³Ä¡Çϱâ À§ÇÑ »ç¾çÀº ´ÙÀ½°ú °°½À´Ï´Ù:
¼³Ä¡°¡ ³¡³ ÈÄ »ç¿ë°¡´ÉÇÑ ODBC¸¦ ¸¸µé¾î¾ß ÇÕ´Ï´Ù. ODBC ¼³Á¤Ã¢À» ¿±´Ï´Ù : ½ÃÀÛ -> ¼³Á¤ -> Á¦¾îÆÇ -> °ü¸®µµ±¸ -> µ¥ÀÌÅÍ ¿øº»(ODBC) ¿ì¸®´Â ¼Ò½º¸¦ »ý¼ºÇÏ´Â ¹æ¹ý¿¡ ´ëÇÑ ¼³¸íÀ» Æ÷ÇÔÇÏ°í ÀÖ´Â ¿¹Á¦ Á¸Á¤º¸ µ¥ÀÌÅͺ£À̽º¸¦ »ç¿ëÇÒ °ÍÀÔ´Ï´Ù. ODBC°ü¸®ÀÚ¿¡¼ ½Ã½ºÅÛ DNSÅÇÀ¸·Î °©´Ï´Ù. ÁÖÀÇ : ¹Ýµå½Ã »ç¿ëÀÚ DNS°¡ ¾Æ´Ñ, ½Ã½ºÅÛ DNS¸¦ »ý¼ºÇØ¾ß ÇÕ´Ï´Ù ±×·¸Áö ¾ÊÀ¸¸é ODBC¹é¿£µå´Â µ¿ÀÛÇÏÁö ¾Ê½À´Ï´Ù.
Ãß°¡(D)...¸¦ ´©¸£°í µå¶óÀ̹ö¸¦ ¼±ÅÃÇÕ´Ï´Ù.
Microsoft Access Driver¸¦ ¼±ÅÃÇϼ¼¿ä(*.mdb). µ¥ÀÌÅÍ¿øº»À̸§¿¡ PowerDNS¸¦ ³Ö°í ¼³¸íÀº ºñ¿ì¼Åµµ µË´Ï´Ù. ¼±ÅÃ(S)...¸¦ ´·¯¼ µ¥ÀÌÅ͵¥À̽º¸¦ ¼±ÅÃÇÕ´Ï´Ù. (¿¹: C:\Program Files\PowerDNS\powerdns.mdb). ´Ù µÆÀ¸¸é OK¸¦ ´©¸£¼¼¿ä. ´õ ¸¹Àº Á¤º¸´Â A.10À» Âü°í ÇϽʽÿÀ. 3.1. Microsoft Windows¿¡¼ PDNSÀÇ ¼³Á¤ ¶pdns¸¦ ¼³Ä¡ÇÑ µð·ºÅ丮(¿¹. C:\Program Files\PowerDNS\)¾ÈÀÇ pdns.conf ÆÄÀϾÈÀÇ
ÇÁ·Î±×·¥ ÆĶó¸ÞÅ͸¦ Á¶Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
ÁÖÀÇ
±âº» ¼³Á¤ÆÄÀÏÀº ÇÁ·Î±×·¥ ¼³Ä¡½Ã ÇÔ²² ¼³Ä¡ µË´Ï´Ù.
3.2. Microsoft Windows¿¡¼ÀÇ PDNS ±¸µ¿ ¶¸¸¾à pdns¸¦ Windows NT, 2000, XP¿¡ ¼³Ä¡Çß´Ù¸é pdns¸¦ ±âº» ¼ºñ½º·Î µ¿ÀÛ½Ãų ¼ö ÀÖ½À´Ï´Ù.
¾î¶»°Ô Çϳª : ¼ºñ½º·Î °©´Ï´Ù(½ÃÀÛ->¼³Á¤->Á¦¾îÆÇ->°ü¸®µµ±¸->¼ºñ½º) ±×¸®°í PDNS(¼³Ä¡½Ã ¼ºñ½º·Î µî·ÏÀ» ¼±ÅÃÇß¾î¾ß ÇÕ´Ï´Ù)¸¦ ´õºíŬ¸¯Çؼ ½ÃÀÛ¹öÆ°À» ´©¸¨´Ï´Ù. ÁøÇà¹Ù°¡ º¸ÀÌ°í ¼ºñ½º »óÅ°¡ '½ÃÀÛµÊ'À¸·Î ¹Ù²ð °ÍÀÔ´Ï´Ù. pdns.exe --ntservice ·Î ½ÃÀÛÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ¼³Ä¡½Ã ¼ºñ½º·Î µî·ÏÇÏÁö ¾Ê¾Ò´Ù¸é Ä¿¸Çµå¶óÀο¡¼ ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇؼ µî·ÏÇÒ ¼ö ÀÖ½À´Ï´Ù. pdns.exe --register-service ½ÃÀÛ->½ÇÇà..¿¡¼ ÄַܼΠ½ÇÇàÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÀÌ ¹æ½ÄÀ¸·Î Ä¿¸Çµå¶óÀÎ ÆĶó¸ÞÅ͸¦ ¼³Á¤ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. (Ä¿¸Çµå ¶óÀÎ ¿É¼ÇºÎºÐÀ» º¸½Ê½Ã¿À) ¼³Ä¡ÇÒ¶§ ½ÃÀÛ¸Þ´º¿¡ PowerDNS¸¦ Ãß°¡Çؼ, ¸Þ´º¿¡¼ pdns¸¦ ½ÇÇàÇÒ ¼öµµ ÀÖ½À´Ï´Ù. 4. µ¥ÀÌÅͺ£À̽º ¿¬°á¼³Á¤ ¶ÀÌ Ã©ÅÍ¿¡¼´Â Generic MySQL ¹é¿£µå¸¦ ¼³Á¤ÇÏ´Â ¹ýÀ» ¼³¸íÇÕ´Ï´Ù.
MySQL¹é¿£µåÀÇ À̸§Àº 'gmysql'ÀÌ¸ç »ç¿ëÇÏ·Á¸é pdns.conf¿¡¼ÀÇ ¼³Á¤ÀÌ ÇÊ¿äÇÕ´Ï´Ù.
´ÙÀ½À» ¼³Á¤ÆÄÀÏ¿¡ Ãß°¡ÇϽʽÿä:
launch=gmysql gmysql-host=127.0.0.1 gmysql-user=root gmysql-dbname=pdnstest ÀÌÀüÀÇ bind-example-zones¸¦ Æ÷ÇÔÇÑ ¸ðµç ¼³Á¤À» Á¦°ÅÇϽʽÿÀ.
¹ÙÀÎµå ¸ðµâÀº ´õÀÌ»ó »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.
ÁÖÀÇ : µ¥ÀÌÅͺ£À̽º¿¡ Á¢¼ÓÇÏÁö ¾Ê°í È£½ºÆ®³×ÀÓ¿¡ ´ëÇÑ ÁúÀÇ°¡ °¡´ÉÇÑÁö È®ÀÎÇϽʽÿä. ´ß°ú ´Þ°¿ÀÇ ¹®Á¦¸¦ ¸·±â À§ÇØ ¿©±â¿¡ IP ÁÖ¼Ò¸¦ °ø±ÞÇÏ´Â °ÍÀ» Á¶¾ðÇÕ´Ï´Ù.
ÁÖÀÇ : ÀÌ ¼³Á¤Àº ºÐ¸íÈ÷ 'g'mysql ¹é¿£µå¿¡ ´ëÇÑ ¼³Á¤ÀÔ´Ï´Ù.
¸¸¾à 'mysql'¹é¿£µå¸¦ »ç¿ëÇÑ´Ù¸é A.5 ÀýÀ» ÂüÁ¶ÇϽʽÿÀ.
PDNS¸¦ ¸ð´ÏÅÍ ¸ðµå·Î ½ÃÀÛÇÕ´Ï´Ù:
# /etc/init.d/pdns monitor (...) 15:31:30 PowerDNS 1.99.0 (Mar 12 2002, 15:00:28) starting up 15:31:30 About to create 3 backend threads 15:31:30 [gMySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest' 15:31:30 [gMySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest' 15:31:30 [gMySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest' 4.1. MySQL ¼³Á¤ ¶À¯È¿ÇÑ »ç¿ëÀÚ·Î MySQL¿¡ Á¢¼ÓÇؼ ¾Æ·¡ÀÇ Ä¿¸Çµå¸¦ ÀÔ·ÂÇÕ´Ï´Ù:
create table domains ( id INT auto_increment, name VARCHAR(255) NOT NULL, master VARCHAR(20) DEFAULT NULL, last_check INT DEFAULT NULL, type VARCHAR(6) NOT NULL, notified_serial INT DEFAULT NULL, account VARCHAR(40) DEFAULT NULL, primary key (id) )type=InnoDB; CREATE UNIQUE INDEX name_index ON domains(name); CREATE TABLE records ( id INT auto_increment, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(6) DEFAULT NULL, content VARCHAR(255) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, change_date INT DEFAULT NULL, primary key(id) )type=InnoDB; CREATE INDEX rec_name_index ON records(name); CREATE INDEX nametype_index ON records(name,type); CREATE INDEX domain_id ON records(domain_id); create table supermasters ( ip VARCHAR(25) NOT NULL, nameserver VARCHAR(255) NOT NULL, account VARCHAR(40) DEFAULT NULL ); GRANT SELECT ON supermasters TO pdns; GRANT ALL ON domains TO pdns; GRANT ALL ON records TO pdns; ÀÌÁ¦ ºó µ¥ÀÌÅÍ º£À̽º°¡ »ý°å½À´Ï´Ù. PDNS¸¦ ¸ð´ÏÅÍ ¸ðµå·Î ½ÇÇàÇϸé
´ÙÀ½°ú °°ÀÌ ¾Æ¹« ¿¡·¯ ¾øÀÌ ½ÇÇàµÇ¾î¾ß ÇÕ´Ï´Ù:
# /etc/init.d/pdns monitor (...) 15:31:30 PowerDNS 1.99.0 (Mar 12 2002, 15:00:28) starting up 15:31:30 About to create 3 backend threads 15:39:55 [gMySQLbackend] MySQL connection succeeded 15:39:55 [gMySQLbackend] MySQL connection succeeded 15:39:55 [gMySQLbackend] MySQL connection succeeded »ùÇà Äõ¸®¸¦ º¸³»¸é µ¥ÀÌÅÍ°¡ ¾ø´Ù´Â °á°ú°¡ ³ª¿Ã °ÍÀÔ´Ï´Ù:
$ host www.test.com 127.0.0.1 www.test.com A record currently not present at localhost ±×¸®°í ¸ð´ÏÅÍ Äֿܼ¡´Â ´ÙÀ½°ú °°Àº ¸Þ¼¼Áö°¡ ³ªÅ¸³¯ °ÍÀÔ´Ï´Ù:
Mar 12 15:41:12 We're not authoritative for 'www.test.com', sending unauth normal response ÀÌÁ¦ µ¥ÀÌÅͺ£À̽º¿¡ ·¹Äڵ带 ÀÔ·ÂÇÕ´Ï´Ù:
# mysql pdnstest mysql> INSERT INTO domains (name, type) values ('test.com', 'NATIVE'); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'test.com','localhost ahu@ds9a.nl 1','SOA',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'test.com','dns-us1.powerdns.net','NS',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'test.com','dns-eu1.powerdns.net','NS',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'www.test.com','199.198.197.196','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'mail.test.com','195.194.193.192','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'localhost.test.com','127.0.0.1','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'test.com','mail.test.com','MX',120,25); ÀÌÁ¦ www.test.com¿¡ ´ëÇÑ Äõ¸®¸¦ ´Ù½Ã º¸³»¸é ´ÙÀ½°ú °°Àº °á°ú°¡ ³ª¿Ã°ÍÀÔ´Ï´Ù:
$ host www.test.com 127.0.0.1 www.test.com A 199.198.197.196 $ host -v -t mx test.com 127.0.0.1 Address: 127.0.0.1 Aliases: localhost Query about test.com for record types MX Trying test.com ... Query done, 1 answer, authoritative status: no error test.com 120 IN MX 25 mail.test.com Additional information: mail.test.com 120 IN A 195.194.193.192 °á°ú¸¦ È®ÀÎÇÏ°í ½Í´Ù¸é, PDNS¸ð´ÏÅÍ Äֿܼ¡¼ SHOW * Ä¿¸Çµå¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù:
% show * corrupt-packets=0,latency=0,packetcache-hit=2,packetcache-miss=5,packetcache-size=0, qsize-a=0,qsize-q=0,servfail-packets=0,tcp-answers=0,tcp-queries=0, timedout-packets=0,udp-answers=7,udp-queries=7, % ¼öÄ¡µéÀº Á¶±Ý¾¿ ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.
ÀÌÁ¦ QUIT·Î ³¡³»°í, start ·Î PDNS¸¦ ÀÏ¹Ý µ¥¸óÀ¸·Î ½ÇÇàÇÑ µÚ »óŸ¦ È®ÀÎÇÕ´Ï´Ù.
# /etc/init.d/pdns start pdns: started # /etc/init.d/pdns status pdns: 8239: Child running # /etc/init.d/pdns dump pdns: corrupt-packets=0,latency=0,packetcache-hit=0,packetcache-miss=0, packetcache-size=0,qsize-a=0,qsize-q=0,servfail-packets=0,tcp-answers=0, tcp-queries=0,timedout-packets=0,udp-answers=0,udp-queries=0, ´ç½ÅÀº ÀÌÁ¦ µ¥ÀÌÅͺ£À̽º·Î µ¿ÀÛÇÏ´Â ³×ÀÓ¼¹ö¸¦ °¡Á³½À´Ï´Ù!
ÇöÀç »ç¿ëÇÏ°í ÀÖ´Â ´Ù¸¥ Á¸ÆÄÀÏÀ» º¯È¯Çϱâ À§Çؼ´Â Appendix A¿¡ ÀÖ´Â zone2sqlÀ» »ç¿ëÇϽʽÿÀ.
4.1.1. ÀϹÝÀûÀÎ ¹®Á¦ ¶´ëºÎºÐÀÇ ¹®Á¦´Â PDNS°¡ µ¥ÀÌÅͺ£À̽º¿¡ Á¢¼ÓÇÒ ¼ö ¾øÀ» °æ¿ì¿¡ ¹ß»ýÇÕ´Ï´Ù.
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ÀÌ ¿¡·¯´Â MySQL¼³Ä¡½Ã ¼ÒÄÏÀÇ À§Ä¡°¡ ´Ù¸¥°æ¿ì¿¡ ¹ß»ýÇÒ ¼ö ÀÖ½À´Ï´Ù.
¼ÒÄÏÀ» ã¾Æ¼ MySQL ¼³Á¤ºÎºÐÀÇ gmysql-socket ¿¡¼
¼ÒÄÏÀÇ À§Ä¡¸¦ ÁöÁ¤ÇØ Áֽʽÿä.
(º¸Åë /var/run/mysqld.sock ¿¡ µé¾îÀÖ½À´Ï´Ù.)
Host 'x.y.z.w' is not allowed to connect to this MySQL server
´Ù¸¥ ¹æ¹ýÀ¸·Î ¼ÒÄÏ¿¡ Á¢¼ÓÇÏÁö ¾Ê°í ¼³Á¤¿¡¼ gmysql-host=127.0.0.1 À¸·Î ÁöÁ¤ÇÏ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù. |
How sharper than a hound's tooth it is to have a thankless serpent. |