1992.10.5


SUBJECT: NIS(Network Information Service)ÀÇ Administration

STATUS OF THIS MEMO:
Administration GuideÀÇ NIS Chapter¸¦ ¹ø¿ªÇÑ °ÍÀÓ.

DESCRIPTION:

  ¢Á NIS Á¤ÀÇ

     NIS´Â Sun¿¡¼­ ¹èÆ÷µÈ network lookup serviceÀ̸ç, ¸î°³ÀÇ master nodeµé·Î ¿ÏÀüÈ÷ º¹»çÇÏ´Â
     database¸¦ °¡Áö°í ÀÖ´Ù. °¢ master mode´Â database¸¦ À§ÇÑ server process¸¦ ¼öÇàÇϸç ÀÌ°ÍÀº
     NIS server·Î ³ªÅ¸³»¾îÁø´Ù. muntiple server´Â database ÀÏÄ¡¸¦ º¸ÀåÇϱâ À§ÇØ ±×µé ½º½º·Î
     ¼öÁ¤µÈ database¸¦ ÆÛÆ®¸°´Ù. ¾ÈÁ¤µÈ »óÅ¿¡¼­ , ¾î´À server process°¡ client request¿¡ 
     ´äÇÒ°ÍÀÎÁö´Â ¹®Á¦°¡ µÇÁö ¾Ê´Â´Ù. ±× ÀÌÀ¯´Â serverµéÀÇ ´ë´äÀÌ µ¿ÀÏÇϱ⠶§¹®ÀÌ´Ù.
     ÀÌ°ÍÀº network´ç multiple server°¡ ³ôÀº À¯È¿¼º°ú ½Å·Ú¼ºÀÇ NIS service¸¦ ÁְԵȴÙ.
     NIS DomainÀº µ¿ÀÏÇÑ NIS database¸¦ »ç¿ëÇÏ´Â ÇϳªÀÇ network»ó¿¡¼­ÀÇ nodeµéÀÇ ÁýÇÕÀÌ´Ù.
     NIS domainµéÀº internet domainµé°ú sendmail domainµé·Î ºÎÅÍ ´Ù¸£°Ô ¼³Á¤µÉ¼öµµ ÀÖ´Ù.
     NIS domainname directory´Â mapÁýÇÕµéÀ» Æ÷ÇÔÇÏ´Â /var/yp¾ÈÀÇ directoryÀÌ´Ù.
     NIS server´Â /var/ypÀÇ subdirectory¾È¿¡ ÀÖ´Â NIS domainÀÇ ¸ðµç mapµéÀ» À¯ÁöÇÑ´Ù.
     ¿¹¸¦µé¸é, sunse domainÀ» À§ÇÑ mapµéÀº /var/yp/sunse¾È¿¡ Á¸ÀçÇÑ´Ù. 
     domain nameÀº NIS database·ÎºÎÅÍ data¸¦ °Ë»öÇϱâ À§ÇØ ¿ä±¸µÈ´Ù. 
     network»ó¿¡¼­ÀÇ °¢ machineÀº /etc/defaultdomain·Î ¼³Á¤µÈ default domain¿¡ ¼ÓÇÏ°í
     /etc/rc.local¸¦ booting½Ã ÂüÁ¶ÇÑ´Ù. domain nameÀº server¿Í clientµé ¸ðµÎ¿¡ ¼³Á¤µÇ¾ß ÇÑ´Ù.
     °¢ NIS mapÀº ÀÏ·ÃÀÇ °ªµé°ú ±×µéÀÇ ¿¬°üµÈ keyµéÀ» Æ÷ÇÔÇÏ°í ÀÖÀ¸¸ç, ÇÁ·Î±×·¥µéÀº ÀÌ·± °ªµéÀ»
     Á¶»çÇÑ´Ù. ´ëºÎºÐ ÇöÀç mapµéÀº ÀüÅëÀûÀ¸·Î /etc directory¿¡¼­ ¹ß°ßµÇ´Â ASCII fileµé·Î ºÎÅÍ
     ÃßÃâµÈ´Ù. NIS mapÀÇ Á¤º¸´Â ASCII file¾ÈÀÇ data¿Í À¯»çÇÏÁö¸¸ dbm formatÀ¸·Î À¯ÁöµÈ´Ù.
     ¸ðµç dbm fileµé¿¡¼­, ÇϳªÀÇ NIS mapÀº ±¸ºÐÇÒ¼ö ÀÖ´Â mapnameÀ» °¡Áö°í ÀÖ°í, µÎ°³ÀÇ È­ÀÏÀÎ
     mapname.dir°ú mapname.pag¸¦ º¸ÃæÇÑ´Ù. 
     ¿¹¸¦µé¸é, hosts.bynameÀº internet address¸¦ ã±â À§ÇØ machineµé¿¡ ÀÇÇØ ÂüÁ¶µÈ´Ù.
     hosts.byname database¸¦ À§ÇÑ Á¤º¸´Â hosts.byname.pag¿Í hosts.byname.dirÀÎ µÎÈ­ÀϾȿ¡ ÀúÀåµÈ´Ù.
     .pag·Î ³¡³ª´Â È­ÀÏÀº ½ÇÁ¦ÀûÀÎ map entryµéÀ» Æ÷ÇÔÇÏ°í ÀÖ´Ù.


  ¢Á NIS Servers ¿Í Clients 

     NIS server´Â ÀÏ·ÃÀÇ NIS mapµéÀ» ÀúÀåÇÏ°í ÀÖ´Â disk¸¦ °¡Áø machineÀÌ´Ù.
     NIS server¿¡´Â master¿Í slave µÎÁ¾·ù°¡ ÀÖ´Ù.
     Master server´Â slave serverµéÀÇ database¸¦ updateÇÑ´Ù. º¯È­ÇÑ ³»¿ëµéÀº master server¿¡¼­
     NIS slave serverµé·Î Àü´ÞµÈ´Ù. ¸¸¾à NIS databaseµéÀÌ master server machineµé ´ë½Å¿¡ slave server
     »ó¿¡¼­ ¸¸µé¾îÁö°Å³ª ¼öÁ¤À̵ȴٸé NISÀÇ update algorithmÀº Æı«µÉ°ÍÀÌ´Ù. 
     database ¼öÁ¤°ú »ý¼ºÀº ¹Ýµå½Ã master server machine»ó¿¡¼­¸¸ ÀÌ·ç¾îÁø´Ù.
     SunÀº single domain»ó¿¡¼­ ¸¸µé¾îÁö´Â ¸ðµç mapµéÀ» À§ÇØ single server master¸¦ ¸¸µéµµ·Ï ¿ä±¸ÇÏ°í
     ÀÖ´Ù.  ´Ù¸¥ SunOS version¿¡¼­µµ NIS ȯ°æÀ» Áö¿øÇÏ°í ÀÖ´Ù.
     Sun¿¡¼­ÀÇ master server´Â release 4.1À̻󿡼­ ¼öÇàÇϵµ·Ï ±ÇÀåÇÏ°í ÀÖ´Ù. ±× ÀÌÀ¯´Â Á»´õ ºü¸¥
     map transterring¶§¹®ÀÌ´Ù.

     . NIS Master Server
       1) master mapµéÀ» °¡Áü
       2) master mapµéÀ» updateÇÔ
       3) NIS slave serverµé·Î master mapµéÀ» Àü´ÞÇÔ
       4) NIS domain»ó¿¡¼­ NIS clientµé¿¡°Ô NIS service¸¦ Á¦°øÇÔ
       5) ypserv ¿Í ypbind¸¦ ¼öÇàÇÔ

     . NIS Slave Server
       1) master NIS mapµéÀÇ copyº»À» °¡Áü
       2) NIS master server·ÎºÎÅÍ copyº»µéÀ» ¹ÞÀ½
       3) NIS domain»ó¿¡¼­ NIS clientµé·Î NIS service¸¦ Á¦°ø
       4) ypserv ¿Í ypbind¸¦ ¼öÇàÇÔ

     . NIS client
       1) NIS network service¸¦ »ç¿ëÇÏ´Â host
       2) serverµéÀÇ mapµé·ÎºÎÅÍ data¸¦ ¿ä±¸ÇÏ´Â processµéÀ» ¼öÇàÇÔ
       3) ypbind¸¸ ¼öÇàÇÔ


 
  ¢Á ypbind ¿Í ypserv

     NIS clinetµéÀº binding process¸¦ ÅëÇØ NIS server·ÎºÎÅÍ Á¤º¸¸¦ ¾ò´Â´Ù. 
     ypbind°¡ ±â¾ïÇÏ´Â Á¤º¸¸¦ bindingÀ̶ó ºÒ¸°´Ù. 
     bindingÀº NIS serverÀÇ internet address¸¦ °¡Áø domain name°ú ¿¬·ùµÇÀÖ´Ù.
     ÀÌ·± Á¤º¸´Â domainname.version filenameÀ» »ç¿ëÇÏ´Â /var/yp/binding diretory¾È¿¡ ÀúÀåµÇÀÖ´Ù.
     binding process´Â client requestµé¿¡ ÀÇÇØ °¡µ¿µÈ´Ù. bindingÀÌ broadcast¿¡ ÀÇÇØ ¼³Á¤µÊÀ¸·Î
     ¸ðµç net»ó¿¡¼­ Àû¾îµµ ÇϳªÀÇ ypserv process°¡ ÀÖ¾î¾ß ÇÑ´Ù.     
     ÀÏ´Ü domainÀÌ Æ¯Á¤ÇÑ ypbind¿¡ ÀÇÇØ bindµÇ¸é °°Àº bindingÀÌ ±× node»óÀÇ ¸ðµç client process¿¡°Ô
     ÁÖ¾îÁø´Ù.
     binding°ú rebindingµéÀº C ¶óÀ̺귯¸® ·çƾ¿¡ ÀÇÇØ ´Ù·ç¾îÁø´Ù. ¸¸¾à ypbind°¡ bindµÇ¾î¾ßÇÒ 
     ypserv¿¡°Ô ¸»ÇÒ¼ö ¾øÀ»¶§ , unboundµÈ »óÅ·μ­ domainÀ» Çü¼ºÇÏ°í client process¿¡°Ô ±× domainÀº
     unbound»óŶó°í ¸»ÇÏ°í, ´Ù½Ã Çѹø domainÀ» bindÇÑ´Ù.
     ¸¸¾à file /var/yp/ypserv.log°¡ ypserv±¸µ¿½Ã Á¸ÀçÇÑ´Ù¸é, log informationÀº error Á¶°Ç¹ß»ý½Ã
     ÀÌ file¿¡ ÀúÀåÇÑ´Ù.
     file /var/yp/binding/domainname.versionÀº binding process °¡¼ÓÈ­¸¦ À§ÇØ ¸¸µé¾îÁø´Ù.  
     ÀÌ·± fileµéÀº ÁÖ¾îÁø domainÀ» À§ÇØ »ý¼ºµÈ ÃÖÁ¾ ¼º°øÇÑ bindingÀ» ÀúÀåÇÏ°í , bindingÀÌ ¿äûµÉ¶§
     ÀÌ fileµéÀÌ Å¸´ç¼ºÀ» À§ÇØ °Ë»çµÈÈÄ »ç¿ëµÈ´Ù.
     ¸¸¾à /usr/etc/yp/ypsetÀÌ ypbind -ypset(option) ³ª¿À±âÀü¿¡ »ç¿ëµÈ´Ù¸é, ±× ¸í·É¾î´Â ´ÙÀ½°ú °°Àº
     messages¸¦ º¸ÀÌ¸ç ½ÇÆÐÇÒ°ÍÀÌ´Ù.

          Sorry, ypbind on host xx has rejected your request

     . NIS client´Â booting½Ã NIS binding daemon (usr/etc/ypbind)¸¦ ¼öÇàÇÔ
     . ypbind´Â NIS server¸¦ bindÇϱâ À§ÇØ request¸¦ local area network·Î broadcastÇÔ
     . NIS server´Â NIS server daemon (/usr/etc/ypserv)¸¦ ¼öÇàÇÔ. ÀÌ°ÍÀº request¸¦ ¸¸µå´Â client·Î
       bindingÇÔ
     . client¿¡ ÀÇÇØ ¸¸µé¾îÁø ¸ðµç NIS lookup requestµéÀº ypbind¿¡ ÀÇÇØ server machine»óÀÇ 
       ypserv·Î º¸³¿
     . ¸¸¾à NIS server°¡ ¿¬¼ÓÀûÀÎ bindingÈÄ¿¡µµ ¹ÝÀÀÇÏÁö ¾Ê´Â´Ù¸é, ypbind´Â ´Ù¸¥ server·Î bindÇϱâ
       broadcast mode·Î µ¹¾Æ°¨
     . /usr/etc/ypset (ypbind¿¡°Ô ƯÁ¤ÇÑ domainÀ¸·Î bindÇ϶ó°í ¾Ë·ÁÁÜ)Àº NIS ¹®Á¦µéÀ» debuggingÇϴµ¥
       µµ¿òÀ» ÁÜ. ypsetÀ» »ç¿ëÇϱâÀü¿¡, -ypset optionÀ» °¡Áø ypbind¸¦ »ç¿ëÇÒ°Í.
 
  ¢Á yppasswd ¿Í yppasswdd

     /usr/etc/rpc.passwdd´Â NIS password daemonÀÌ´Ù. 
     ÀÌ daemonÀº NIS master server¿¡¼­¸¸ ¼öÇàÀ̵ǰí , NIS password change requestµéÀ» À§ÇØ
     ºÀ»çÇÑ´Ù. ÀÌ°ÍÀº ¸ðµç slave serverµéÀÌ password ¼öÁ¤µÇ¾úÀ»¶§ ±×µéÀÇ º¯È­µÈ database¸¦ °¡Áö´Â
     ÇüÅ·Π¼öÇàµÈ´Ù.
     yppasswd´Â NIS passwordµéÀ» º¯È­½ÃÅ°´Â ¸í·É¾îÀÌ´Ù. ÀÌ ¸í·É¾î´Â ¸¶Ä¡ passwordó·³ ½ÇÇàµÇÁö¸¸,
     local /etc/passwd file´ë½Å¿¡ NIS master server¾ÈÀÇ password¸¦ ´Ù·é´Ù. 
     NIS client¿¡ ÀÇÇÑ yppasswd ¸í·É¾î´Â NIS master server»ó¿¡¼­ ¼öÇàÇÏ´Â rpc.passwdd¿¡ ÀÇ·ÚÇÑ´Ù.

  ¢Á NIS¿¡ ÀÇÇØ ¿µÇâÀ» ¹Þ´Â È­Àϵé

     . /etc/passwd fileÀº NIS°¡ ¼öÇàµÉ¶§ óÀ½ ±¹ºÎÀûÀ¸·Î ÂüÁ¶µÈ´Ù. local passwd¾ÈÀÇ data´Â 
       NIS databaseº¸´Ù ¿ì¼±±ÇÀ» °¡Áø´Ù. 
       local passwd file¾ÈÀÇ entryµéÀº root¿Í ¾î¶² ´Ù¸¥ local userµéÀ» À§ÇØ Á¸ÀçÇØ¾ß ÇÑ´Ù.
       /etc/passwd¸¦ callÇÏ´Â programµéÀº óÀ½¿¡ local password¸¦ ÂüÁ¶ÇÑÈÄ NIS database¸¦ ÂüÁ¶ÇÑ´Ù.
     . /etc/group fileµµ ¿ì¼± ÂüÁ¶µÈ´Ù. ¿ª½Ã NIS databaseº¸´Ù ¿ì¼±±ÇÀ» °¡Áø´Ù.
     . NIS ¼öÇà½Ã /etc/hosts fileÀº booting½Ã¸¸ ÂüÁ¶µÈ´Ù.
       ±×°ÍÀº boogin½Ã¸¸ ÂüÁ¶µÇ±â¶§¹®¿¡ ±× È­ÀÏÀº local host name°ú ¸ðµç machineµéÀ» À§ÇÑ entry¸¦
       °¡Áö°í ÀÖ¾î¾ß Çϸç, local loopback¸¦ À§ÇÑ entry´Â localhostÀÓ.
              127.0.0.1     localhost
              192.9.10.101  sparc
       ÀÏ´Ü host°¡ bootµÇ¸é host address¸¦ ºÐ¼®ÇÒ¶§ NIS host database¸¸ÀÌ ÂüÁ¶µÈ´Ù.
     . Mail aliasesµµ local machine /etc/aliases fileÀ» ¸ÕÀú Á¡°ËÇÑÈÄ NIS aliases database¸¦ 
       ÂüÁ¶ÇÑ´Ù.
     . NIS ¼öÇà½Ã ºÎ°¡ÀûÀÎ mail aliases´Â NIS serverµé»óÀÇ mail.aliases map¾È¿¡ À§Ä¡ÇÑ´Ù.
       local /etc/bootparams fileÀº µ¿ÀÏÇÑ NIS mapÀÌ ÂüÁ¶µÇ±â ÀÌÀü¿¡ clientÀÇ boot Á¤º¸¸¦ À§ÇØ 
       ÂüÁ¶µÈ´Ù. 




  ¢Á /etc/passwd

     +::0:0:::  --> ¸ðµç NIS password database entryµéÀº ÀÌ host¿¡¼­ ÇÕ¹ýÀûÀÓ.
                        ÀÌ Ç׸ñÀº /etc/passwd¾È¿¡¼­ ¸¶Áö¸·¿¡ Á¸ÀçÇØ¾ß ÇÑ´Ù.
                        ÀÌ Ç¥½Ã´Â /etc/passwd¸¦ callÇÏ´Â programÀº óÀ½ ¿©±â password fileÀ» Á¶»çÇÒ
                        °ÍÀÌ´Ù. ¸¸¾à user°¡ ¿©±â passwd file¿¡ ¾øÀ¸¸é NIS password database°¡
                        Á¶»çµÉ °ÍÀÓ. 
     +ljs:      --> ljs´Â ÀÌ host¿¡¼­ ÇÕ¹ýÀûÀÌ¸ç ¿©±âÀÇ password data´Â NIS database¾È¿¡ ÀÖÀ½.
     +ljs:::::/home/ljs:  --> ljs´Â ÀÌ host¿¡¼­ ÇÕ¹ýÀûÀ̸ç,ºüÁø passwordÇ׸ñÀº NIS database¾È¿¡
                                   ÀÖ´Ù. local password entry¾È¿¡ ³ªÅ¸³­ data´Â NIS password data¸¦
                                   ¹«½ÃÇÑ´Ù. ¸¸¾à NIS password database»ó¿¡¼­ home directory°¡
                                   /usr/ljs¶ó¸é, loginÈÄ ljsÀÇ home directory´Â /home/ljs°¡ µÊ.
   
  ¢Á /etc/group

     +source:  --> NIS group database¿¡¼­ Á¤ÀÇµÈ source groupÀº ÀÌ host¿¡¼­ ÇÕ¹ýÀûÀÓ.
     +:            --> NIS group database¿¡¼­ Á¤ÀÇµÈ ¸ðµç groupµéÀº ÀÌ host¿¡¼­ ÇÕ¹ýÀûÀÓ. 

  ¢Á NIS¿¡ ÀÇÇØ ±³Ã¼µÇ´Â È­Àϵé

    ÀÌ·± È­ÀϵéÀº NIS ¼öÇà½Ã local machine»ó¿¡¼­ °áÄÚ ÂüÁ¶µÇÁö´Â ¾Ê´Â´Ù.
    ºñ·Ï ¿øÇÏ´Â Á¤º¸°¡ local fileµé¿¡ Á¸ÀçÇÑ´Ù ÇÏ´õ¶óµµ ÀÌ·± È­Àϵ鿡 Æ÷ÇÔµÈ Á¤º¸¸¦ Á¶»çÇϱâ À§Çؼ± 
    NIS database¸¸ ÂüÁ¶µÈ´Ù.
    
    . /etc/ethers  --> local domain»óÀÇ ¸ðµç machineµéÀÇ ethernet address¿Í host nameÀ» Æ÷ÇÔÇÔ.
    . /etc/netgroup  --> machineµéÀÇ network groupµéÀ» ³ªÅ¸³¿.
    . /etc/netmasks  --> IP stanadard subneting¸¦ ½ÇÇàÅ°À§ÇÑ default netmask¸¦ Æ÷ÇÔÇÔ.
    . /etc/networks  --> ¿©·¯ºÐÀÇ internetwork»óÀÇ ¸ðµç networkµéÀÇ À̸§°ú ¹øÈ£¸¦ ³ªÅ¸³¿. 
    . /etc/protocols --> ¾Ë·ÁÁø IP protocol À̸§µé°ú ¹øÈ£µéÀ» Æ÷ÇÔÇÏ°í ÀÖÀ½.
    . /etc/services  --> ±× system¿¡ À¯¿ëÇÑ °¢ TCP/IP network service¸¦ À§ÇÑ entry¸¦ Æ÷ÇÔÇÔ. 

  ¢Á NIS Master Server ÃʱâÈ­

    1) domain nameÀ» ¼³Á¤ÇÔ
        
        # domainname  sunse
    
    2) /etc/defaultdomain fileÀ» ¼öÁ¤ ȤÀº »ý¼º
        NIS domain nameÀ» ºÎ°¡ÇÔ
    
    3) /etc/rc.local È­ÀÏÀ» ¼öÁ¤ÇÔ
       . ypbind startup lineµéÀÌ Ç®·ÁÁ® Àִ°¡¸¦ È®ÀÎÇÔ
       . bootup½Ã /usr/etc/rpc.yppasswdd¸¦ °¡µ¿½ÃÅ°±â À§ÇØ ´ÙÀ½°ú °°Àº ¶óÀεéÀ» ÷°¡½ÃÅ´
         ´ÙÀ½ ¶óÀεéÀº ypserv daemon Á¤º¸´ÙÀ½¿¡ »ðÀÔ½ÃÅ´

          if [ -f /usr/etc/rpc.yppasswdd -a -d /var/yp/`domainname` ] ;
                  then /usr/etc/rpc.yppasswdd /etc/passwd -m;
                  echo -n ' rcp.passwdd '
          fi
    
         À§ÀÇ -m flag´Â /var/yp¾È¿¡¼­ ¹ß°ßµÇ´Â NIS mapµéÀ» Á¤Á¤ÇÏ°í ±× º¯È­µéÀ» slave serverµé·Î
         pushÇϱâ À§ÇØ ¿­°ÅÇßÀ½.
       . ¿©·¯ºÐÀº NIS master »óÀÇ userµéÀ» À§ÇÑ /etc/passwd¿Í ¸ðµç NIS userµéÀ» À§ÇÑ /etc/passwd.yp
         ¸¦ ¿øÇÒÁöµµ ¸ð¸¥´Ù. ÀÌ·± °æ¿ì´Â ´ÙÀ½°ú °°Àº ÀýÂ÷¸¦ °ÅÄ¡¸é µÈ´Ù. 
           ù°   /var/yp/Makefile¿¡¼­ $(DIR)/passwd¸¦ $(DIR)/passwd.yp·Î ¼öÁ¤ÇÔ 
           µÑ°   /etc/rc.localÀÇ yppasswdd»ó¿¡¼­ /etc/passwd¸¦ /etc/passwd.yp·Î ¼öÁ¤ÇÔ 
       . °í¼Ó transfer daemonÀ» °¡µ¿½ÃÅ°±â À§ÇØ ypxfrd startup lineµéÀ» comment out ½ÃÅ´

    4) NIS database»ó¿¡ Æ÷ÇÔµÈ ASCII fileµéÀ» ¼öÁ¤ÇÔ
        ÀÌ·± È­ÀϵéÀº passwd , hosts , ethers , group , aliases , netgroup , networks , netgroup ,
        protocols , bootparams , services ÀÓ
        passwd¿Í groupÈ­Àϵ鿡¼­ + entryµéÀ» Á¦°ÅÇÔ ( °ø¹é netgroupÀº ºó netgroup mapÀ» ¸¸µë)





    5) database¸¦ ¸¸µë
       
         #  mkdir  /var/yp
         #  cp  /export/exec/proto.root.sunos.4.1.x/var/yp/Makefile  /var/yp
             (ÀÌ ÀÛ¾÷Àº suninstall°úÁ¤¿¡¼­ NIS master¸¦ ¼³Á¤ÇÏÁö ¾Ê¾ÒÀ»½Ã /var/yp°¡ ¾ø±â¶§¹®ÀÓ)
         #  cd  /usr/etc/yp
         #  ypinit -m   (¿©±â¼­ mÀº master server)
              quit on non-fatal errors [y/n:]  y
              next host to add : master    /* mastername
              next host to add : slave     /* slavename --> ¸¸¾à ¿©·¯ºÐÀÌ ¾î¶² server°¡ NIS slave 
              next host to add : ^D                      server°¡ µÉÁö ¾È´Ù¸é ¿©±â¼­ À̸§À» ÀÔ·ÂÇÔ 

    6) fastboot¸¦ »ç¿ëÇÏ¿© rebootÇÔ 
        ¸ðµç daemonµéÀ» ¿Ã¹Ù¸£°Ô °¡µ¿½ÃÅ°±â À§Çؼ­´Â rebootÇÏ´Â °ÍÀÌ ½±´Ù. 
       

  ¢Á NIS Slave Server ÃʱâÈ­  

    1) domain nameÀ» ¼³Á¤ÇÔ
  
    2) /etc/defaultdomain fileÀ» ¼öÁ¤ ȤÀº »ý¼º
        NIS domain nameÀ» ºÎ°¡ÇÔ

    3) /etc/rc.local È­ÀÏÀ» ¼öÁ¤ÇÔ
       . ypbind startup lineµéÀÌ Ç®·ÁÁ® Àִ°¡¸¦ È®ÀÎÇÔ

    4) ypbind daemonÀ» °¡µ¿½ÃÅ´
        
         # /usr/etc/ypbind

    5) /usr/etc/yp directory·Î º¯°æÈÄ slave server mode»ó¿¡¼­ ypinit¸¦ °¡µ¿ÇÏ¿© master·ÎºÎÅÍ
       database¸¦ ¸ðÀº´Ù. 

         #  cd  /usc/etc/yp
         #  ypinit -s  master   /* mastername
              quit on non-fatal errors [y/n:] y  
 
    6) NIS server daemonÀ» rebootÇÏ¿© °¡µ¿½ÃÅ´
    À§ÀÇ °úÁ¤Àº slave server°¡ master server installµ¿¾È¿¡ ¾ð±ÞÀÌ µÇ¾úÀ» °æ¿ì¿¡ »ç¿ëµÈ´Ù.
    
  ¢Á NIS client ÃʱâÈ­

    1) domain nameÀ» ¼³Á¤ÇÔ
          
         #  domainname  sunse

    2) /etc/defaultdomain fileÀ» ¼öÁ¤ ȤÀº »ý¼º
       NIS domain nameÀ» ºÎ°¡ÇÔ

    3) /etc/rc.local È­ÀÏÀ» ¼öÁ¤ÇÔ
       . ypbind startup lineµéÀÌ Ç®·ÁÁ® Àִ°¡¸¦ È®ÀÎÇÔ

    4) /var/yp directory°¡ Á¸ÀçÇϴ°¡¸¦ È®ÀÎÇÔ. ¾øÀ¸¸é ¸¸µé¾îÁÜ

    5) NIS binding daemonÀ» °¡µ¿½ÃÅ´

         #  fastboot









  ¢Á Master NIS Server Database¿¡ Slave Server ÷°¡
    
    slave server°¡ ÇöÁ¸ NIS domain¿¡ ºÎ°¡µÉ¶§, NIS master´Â ù° new slave¿¡ ´ëÇØ ¾Ë¾Æ¾ß ÇÑ´Ù.
    ¸¸¾à ±×·¸Áö ¸øÇÏ´Ù¸é, master´Â ¸ðµç ´Ù¸¥ NIS serverµé°ú ´õºÒ¾î sync»óÅ¿¡¼­ new slave¸¦ 
    À¯ÁöÇÒ ¼ö°¡ ¾ø´Ù.
    ±×·¡¼­ new slave serverÀÇ Ã·°¡´Â ´ÙÀ½°ú °°ÀÌ ÇàÇØÁ®¾ß ÇÑ´Ù.

    1) ypinit -m °úÁ¤À» »ç¿ëÇÏ¿© NIS master¸¦ ÀçÃʱâÈ­ÇÔ

        mastername#  cd  /usr/etc/yp
        mastername#  ypinit -m 

    2) »õ·Î¿î slaveÀÇ À̸§À» master°¡ ¾Æ´Â NIS slaveµéÀÇ list(NIS domain)·Î µî·ÏÇÔ
       
    3) ´Ù¸¥ slave serverµé ó·³ °°Àº ¹æ¹ýÀ¸·Î new slave server¸¦ ÃʱâÈ­ÇÔ
        
  ¢Á Sync»ó¿¡¼­ Slave Serverµé º¸Á¸

    ÃÖ±ÙÀÇ slave server mapµéÀ» À¯ÁöÇϱâ À§ÇØ /usr/etc/yp/ypxfr ¸í·É¾î°¡ slave serverµé»ó¿¡¼­
    ¼öÇàµÈ´Ù. ¾î¶² mapµéÀ» Àü´ÞÇϱâ À§ÇØ ÀÌ ¸í·É¾î¸¦ ÀÌ¿ëÇÏ´Â shell scriptµéÀÌ Á¸ÀçÇÑ´Ù.
     (¿¹ : ypxfr_1perday , ypxfr_1perhour , ypxfr_2perday)
    site»óȲ¿¡ ¸ÂÃß¾î Àû´çÇÏ°Ô scriptµéÀ» ¼öÁ¤Çضó.
    ÀÌ·± scriptµéÀº /var/spool/cron/crontab/root entry¿¡ ÀÇÇØ Ç×»ó ¼öÇàµÈ´Ù.  
    ypxfrÀÇ transfer ½Ãµµ¿Í °á°ú´Â ypxfr.log¶ó´Â log file¾È¿¡ ³ªÅ¸³­´Ù.
    ´ÙÀ½°ú °°Àº ¸í·É¾î¸¦ »ç¿ëÇÏ¿© log file¸¦ ¸¸µç´Ù.

          #  touch  /var/yp/ypxfr.log

    loggingÀ» ¾ø¾Ö±â À§Çؼ± ´Ü¼øÈ÷ ypxfr.log fileÀ» Á¦°ÅÇÏ¸é µÈ´Ù.

    . master¿¡¼­ slave·Î mapÀ» Àü´ÞÇϱâ À§Çؼ± slave server»ó¿¡¼­ ´ÙÀ½°ú °°Àº ¸í·ÉÀ» »ç¿ëÇØ¾ß ÇÑ´Ù.
          
          #  /usr/etc/yp/ypxfr  desiredmap

    . /usr/etc/yp/ypxfr_1perday´Â ´ÙÀ½ mapµéÀ» º¯È­½ÃŲ´Ù.
         group , protocols , networks , services , ypservers
    . /usr/etc/yp/ypxfr_2perday´Â ¿ª½Ã ´ÙÀ½ mapµéÀ» º¯È­½ÃŲ´Ù.
         hosts , ethers , netgroup , mail aliases
    . /usr/etc/yp/ypxfr_1perhour ´ÙÀ½ mapµéÀ» º¯È­½ÃŲ´Ù.
         passwd
    . slave serverµé·ÎºÎÅÍ ÀÌ·± scriptµéÀ» ¼öÇàÇÑ´Ù.

  ¢Á NIS ȯ°æ¿¡¼­ Diskless Client ÃʱâÈ­

    NIS ȯ°æ¿¡¼­ diskless client÷°¡¸¦ À§ÇÑ ÀÛ¾÷Àº NIS¾øÀÌ »ç¿ëµÇ´Â °úÁ¤°ú À¯»çÇÏ´Ù. 
    ±×·¯³ª, /etc/host ¿Í /etc/ethersÁ¤º¸´Â Áß½ÉÀ§Ä¡¿¡ ÀúÀåµÇ±â ¶§¹®¿¡ ¿ì¼± NIS master server»ó¿¡¼­
    ÀÌ·± data¸¦ ÀÔ·ÂÇÒ ÇÊ¿ä°¡ ÀÖ´Ù.
    ±×¶§ NIS mapµéÀ» ´Ù½Ã¸¸µç´Ù. ±×·¡¼­ diskless client server´Â ±×·± Á¤º¸¸¦ ¾òÀ»¼ö ÀÖÀ» °ÍÀÌ´Ù.
    ¸¸¾à ±× client¸¦ À§ÇÑ /etc/ethers¿Í /etc/hostsÁ¤º¸¸¦ ¾òÁö ¸øÇÑ´Ù¸é add_client¼öÇà½Ã ½ÇÆÐÇÒ °ÍÀÌ´Ù. 
    . NIS master server·Î client Á¤º¸¸¦ ÷°¡½ÃŲ´Ù.
       /etc/hosts    
       /etc/ethers
    . NIS mapµéÀ» ´Ù½Ã¸¸µé¾î push½ÃŲ´Ù.
    . clientÀÇ server»ó¿¡¼­ add_client ¸¦ ¼öÇà½ÃŲ´Ù.
    . NIS master server»ó¿¡¼­ bootparams¸¦ ´Ù½Ã¸¸µé¾î push½ÃŲ´Ù.
    . diskless clientÀÇ server¿¡¼­, clientÀÇ /etc directory¾È¿¡ ÀÖ´Â entryµéÀ» È®ÀÎÇÑ´Ù.
    . directoryµéÀ» /export/root/client/etc·Î ¹Ù²Û´Ù.
      hosts È­ÀÏÀÌ Á¤È®ÇÑÁö¸¦ È®ÀÎÇÑ´Ù.
      defaultdomain¾ÈÀÇ domain nameÀ» ¼³Á¤ÇÑ´Ù.
      /etc/rc.local¿¡¼­ ypbind startup lineµéÀÌ commentoutµÇÀÖ´ÂÁö¸¦ È®ÀÎÇÑ´Ù. 
    . diskless client¸¦ boot½ÃŲ´Ù.






  ¢Á NIS Database¸¦ Updating

    . NIS master machine»ó¿¡¼­ Àû´çÇÑ ASCII file¸¦ º¯°æÇÑ´Ù.
    . local mapÀ» updateÇϱâÀ§ÇØ make ¸í·É¾î¸¦ ½ÇÇà½ÃŲ´Ù. ÀÌ ÀÛ¾÷Àº updateµÈ versionÀ» 
      NIS slave serverµé·Î º¸³½´Ù.
    . ¿¹¸¦ µé¸é, /etc/passwd file¸¦ updateÇÑ´Ù.
       ´ÜÁö NIS machine»ó¿¡¼­¸¸ --
       
          mastername#  vipw     file¸¦ ¼öÁ¤ÇÏ¿© º¯°æÇÔ 
          mastername#  cd  /var/yp
          mastername#  make 
    . make´Â º¯È­µÈ mapµé¸¸ ´Ù½Ã¸¸µç´Ù. 
      º¯È­µéÀÌ ³¡³µÀ»¶§, make´Â NIS slave serverµéÀÇ mapµéÀ» updateÇϱâ À§ÇØ yppush ¸¦ ¾ß±â½ÃŲ´Ù. 

  ¢Á NIS ¸í·É¾î

    . /usr/bin/ypwhich     --> ¿©·¯ºÐÀÇ NIS server°¡ ´©±ºÁö¸¦ º¸¿©ÁÜ
    . /usr/bin/ypwhich -m  --> ¾î¶² mapµéÀÇ master°¡ ¾î´À server machineÀÎÁö¸¦ º¸¿©ÁÜ  
    . /usr/bin/ypwhich clientname  --> ¾î¶² ypserver°¡ NIS client machineÀ¸·Î service¸¦ Á¦°øÇÏ´ÂÁö¸¦
                                        º¸¿©ÁÜ
    . /usr/etc/yp/yppush   --> NIS master server¿¡¼­ ¼öÇàÇϸç master NIS server¿¡¼­ slave NIS
                               server·Î NIS mapÀÇ »õ·Î¿î versionÀ» copyÇÔ
    . /usr/etc/yp/ypset host  --> ƯÁ¤ÇÑ NIS server·Î bind¸¦ ½ÃµµÇÔ
    . /usr/bin/ypcat map   --> NIS mapÀÇ ³»¿ëÀ» º¸¿©ÁÜ
    . ypmatch key0 key1 map  --> NIS map¾È¿¡ Àִ ƯÁ¤ÇÑ keyµéÀÇ °ªÀ» º¸¿©ÁÜ


Revision History
Created      on Oct. 5 ,1992