1. NISÀÇ °³¿ä
NIS Master server -> --------------
ascii
files
aliases
bootparams
ethers
group
hosts
networks
passwd
protocols
services
--------------
------------------
NIS slave server
------------------
------------ ------------
NIS client NIS client
------------ ------------
NIS´Â sun¿¡¼ Á¦°øµÇ´Â network lookup serviceÀÌ´Ù. ¿©·¯°³ÀÇ master server°¡ÀÖ°í server³¢¸®´Â ¼·Î
µ¿ÀÏÇÑ database¸¦ °¡Áö°í ÀÖ´Ù.
°¢ master node´Â database¿¡ ´ëÇÑ server process°¡ µ¹°í ÀÖ°í, ÀÌ°ÍÀ» NIS server¶ó ºÎ¸¥´Ù. °¢ ¼¹öµéÀº
¼·Î updateµÈ Á¤º¸¸¦ ±³È¯ÇÑ´Ù. ÀÌ°ÍÀº ÇÑ server°¡ downµÇ¾úÀ»¶§ ´Ù¸¥ ¼¹ö°¡ µ¿À۵DZ⠶§¹®¿¡ dataÀÇ
À¯È¿¼º°ú ½Å·Ú¼ºÀ» ³ô¿©ÁØ´Ù.
NIS domainÀº °°Àº NIS database¸¦ »ç¿ëÇÏ´Â ³×Æ®¿÷ nodeµéÀÇ groupÀÌ´Ù. NIS domainÀº internet domain°ú
sendmail domain°ú´Â ´Ù¸£°Ô ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù. NIS domainname directory´Â maps fileÀ» /var/yp¿¡ °¡Áö°í
ÀÖ´Ù. ³×Æ®¿÷»ó¿¡ ÀÖ´Â °¢ machineÀº /etc/defaultdomain¿¡ Á¤ÀÇµÈ À̸§¿¡ ¼ÓÇÏ°í, domain nameÀºbooting½Ã
/etc/rc.local ¿¡ ¾ð±ÞµÇ¾î ÀÖ´Ù. domain nameÀº ¼¹ö³ª Ŭ¶óÀ̾ðÆ®³ª ¸ðµÎ settingÇØ ÁÖ¾î¾ß ÇÑ´Ù.
NIS mapÀº ASCII file°ú ºñ½ÁÇϳª dbm formatÀ¸·Î µÇ¾îÀÖ´Ù. ¸ðµç dbm fileÀº mapname.dir°ú mapname.pag
µÎ°³ÀÇ ÈÀÏÀ» °¡Áö°í ÀÖ´Ù.
2. NIS Server and Clients
- NIS Master Server
master mapÀ» °¡Áö°íÀÖ´Ù.
master mapÀ» updateÇÑ´Ù.
NIS slave server¿¡°Ô master mapÀ» º¸³»ÁØ´Ù.
NIS domain»ó¿¡ÀÖ´Â NIS client¿¡°Ô NIS service¸¦ Á¦°øÇÑ´Ù.
ypserv ¿Í ypbind µÑ´Ù ½ÇÇàÇÑ´Ù.
- NIS Slave Server
NIS master mapÀÇ copyº»À» °¡Áö°íÀÖ´Ù.
NIS master server·Î ºÎÅÍ copyº»À» ¹Þ´Â´Ù.
NIS domain¿¡¼ NIS client¿¡°Ô NIS ¼ºñ½º¸¦ ÇÑ´Ù.
ypserv ¿Í ypbindµÑ´Ù µ¹¾Æ°£´Ù.
- NIS Client
NIS server·ÎºÎÅÍ data¸¦ ¹Þ¾Æ »ç¿ëÇÑ´Ù.
ypbind¸¸ ½ÇÇàµÈ´Ù.
3. ypbind and ypserv
- NIS client´Â boot ½Ã¿¡ NIS binding daemon(/usr/etc/ypbind)¸¦ ½ÇÇà½ÃŲ´Ù.
- ypbind´Â NIS server¸¦ ã±âÀ§Çؼ network»ó¿¡¼ broadcast¸¦ ÇÑ´Ù.
- NIS server´Â Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ¹Þ¾ÆµéÀ̱â À§Çؼ NIS server daemon(/usr/etc/ypserv)À»
½ÇÇà½ÃŲ´Ù.
- ¸¸¾à server¿¡¼ ÀÀ´äÀÌ ¾øÀ¸¸é ypbind´Â ¶Ç´Ù¸¥ ¼¹ö¿¡°Ô ¿äûÀ»ÇÑ´Ù.
4. yppasswd and yppasswdd
- yppasswd
. /usr/etc/rpc.yppasswdd´Â NIS passwd daemonÀÌ´Ù.
. ÀÌ daemonÀº NIS master server¿¡¼ ½ÇÇàµÈ´Ù.
. ÀÌ daemonÀº NIS passwd º¯°æ¿ä±¸¸¦ Á¦°øÇÑ´Ù.
. yppasswd´Â NIS passwords¸¦ ¹Ù²Ù´Â ¸í·É¾îÀÌ´Ù. ÀÌ ¸í·É¾î´Â passwdó·³ ¼öÇàµÇ³ª yppasswd´Â
local /etc/passwd file´ë½Å¿¡ master serverÀÇ NIS¿¡ÀÖ´Â password¸¦ ¹Ù²Û´Ù.
5. NIS¿¡ ÀÇÇؼ ¿µÇâÀ» ¹Þ´Â file
- /etc/passwd
NIS°¡ ¼öÇàµÉ¶§ /etc/passwd fileÀ» ¸ÕÀú ã´Â´Ù. local¿¡ ÀÖ´Â passwd data´Â NIS databaseº¸´Ù
¸ÕÀú ¼öÇàµÇ¾î Áø´Ù. /etc/passwd ÇÁ·Î±×·¥Àº ¸ÕÀú local passwd¸¦ ¸ÕÀú ã°í ´ÙÀ½À¸·Î NIS
database¸¦ ã´Â´Ù.
----------------------------------------------------------------------------------------
- +::0:0:::
----------------------------------------------------------------------------------------
¸ðµç NIS password database entries´Â ÀÌ host¿¡¼ À¯È¿ÇÏ´Ù.
----------------------------------------------------------------------------------------
- +joe:
----------------------------------------------------------------------------------------
joe´Â ÀÌ host¿¡¼ À¯È¿ÇÑ À¯ÀúÀÌ°í, ±×ÀÇ password data´Â NIS database¿¡ Á¸ÀçÇÑ´Ù.
- /etc/group
- /etc/aliases
- /etc/bootparams
- /etc/hosts
6. Initializing a NIS Master Server
- domain nameÀ» ¼³Á¤
----------------------------------------------------------------------------------------
# domainname universe
----------------------------------------------------------------------------------------
- /etc/defaultdomain À» ¼öÁ¤ domain nameÀ» Ãß°¡ÇÑ´Ù.
- /etc/rc.local file¿¡¼ /usr/etc/rpc.yppasswddÀ» Ãß°¡ÇÏ°í ypxfrd startup lineÀ» Ãß°¡Ç϶ó.
- database¸¦ ¸¸µé¾î¶ó
----------------------------------------------------------------------------------------
# mkdir /va/yp
# cp /usr/lib/NIS.Makefile /var/yp
# cd /usr/etc/yp
# ypinit -m
quit on non-fatal errors[y/n] n
next host to add: galaxy /* mastername
next host to add: pluto /* slavename
next host to add: ^D
----------------------------------------------------------------------------------------
7. Initializing a NIS Slave Server
- domainname ¼³Á¤
----------------------------------------------------------------------------------------
# domainname universe
----------------------------------------------------------------------------------------
- /etc/defaultdomain¿¡ domainnameÀ» Ãß°¡
- /etc/rc.local¿¡ ypbind¶óÀο¡ # Ç¥½Ã°¡ ÀÖ´ÂÁö È®ÀÎ ÀÖÀ¸¸é »èÁ¦ÇÒ °Í
- /var/yp directory°¡ ¾øÀ¸¸é »ý¼ºÇÒ°Í
- ypbind¸¦ ½ÇÇà
----------------------------------------------------------------------------------------
# /usr/etc/ypbind
----------------------------------------------------------------------------------------
- master·ÎºÎÅÍ database¸¦ ¹Þ±â
----------------------------------------------------------------------------------------
# cd /usr/etc/yp
# ypinit -s galaxy /* mastername
quit on non-fatal errors[y/n] n
----------------------------------------------------------------------------------------
- NIS server daemonÀ» ¼öµ¿À¸·Î ½ÃÀÛÇϰųª rebootÇ϶ó.
----------------------------------------------------------------------------------------
# fastboot
----------------------------------------------------------------------------------------
8. Initializing a NIS Client
- domainnameÀ» ¼öÁ¤
----------------------------------------------------------------------------------------
# domainname universe
----------------------------------------------------------------------------------------
- /etc/defaultdomain fileÀ» »ý¼ºÇÏ°í domain nameÀ» Ãß°¡Ç϶ó.
- /etc/rc.local ¿¡ ypbind°¡ ½ÇÇàµÇ´ÂÁö È®ÀÎ
- /var/yp directory°¡ ÀÖ´ÂÁö È®ÀÎÇÏ°í ¾øÀ¸¸é »ý¼ºÇ϶ó.
- NIS binding daemon ½ÇÇà
----------------------------------------------------------------------------------------
# fastboot
----------------------------------------------------------------------------------------
9. Updating the NIS Database
----------------------------------------------------------------------------------------
master# vipw edit and update the file
master# cd /var/yp
master# make
----------------------------------------------------------------------------------------
10. Information NIS Commands
- ypwhich -> ´ç½ÅÀÇ NIS server°¡ ´©±¸ÀÎÁö º¸¿©ÁØ´Ù.
- ypwhich -m -> master server¸¦ º¸¿©ÁØ´Ù.
- ypwhich clientname -> ¾î¶² NIS server°¡ ÀÌ NIS client¿¡°Ô ¼ºñ½º¸¦ Á¦°øÇÏ´ÂÁö¸¦ º¸¿©ÁØ´Ù.
- yppush -> NIS master server¿¡¼ ½ÇÇàÀÌ µÇ°í NIS master serverÀÇ »õ·Î¿î versionÀÇ
master mapÀ» NIS slave server¿¡°Ô copy¸¦ ÇØÁØ´Ù.
- ypset host -> Ưº°ÇÑ NIS server¸¦ bindÇÑ´Ù.
- ypcat map -> ÁöÁ¤ÇÑ NIS map fileÀ» º¸¿©ÁØ´Ù.
- ypmatch key0 key1 map -> NIS map¿¡¼ Ưº°ÇÑ key°ªÀ» º¸¿©ÁØ´Ù.
|