¼Ö¶ó¸®½º ¾îµå¹Î ¿ä¾à ¹®¼­
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2004-05-30 14:24:40
 

¼Ö¶ó¸®½º ¾îµå¹Î ¿ä¾à ¹®¼­ | UNIX(SUN) 2004/03/31 17:24 

http://blog.naver.com/lunasea94/1554090

¼Ö¶ó¸®½º ¾îµå¹Î

1ºÎ. ¼Ö¶ó¸®½º ¼Ò°³

1. À¯´Ð½º Á¤ÀÇ

À¯´Ð½º´Â 1969³â¿¡ º§ ¿¬±¸¼Ò¿¡¼­ ÀÎÅÍ·¢Æ¼ºê ½ÃºÐÇÒ ½Ã½ºÅÛÀ¸·Î¼­ ¸¸µç °ÍÀÌ ±× ½ÃÃÊ°¡ µÈ ¿î¿µÃ¼°èÀÌ´Ù. ÄË Åè½¼°ú µ¥´Ï½º ¸®Ä¡°¡ À¯´Ð½ºÀÇ Ã¢½ÃÀÚ·Î ¾Ë·ÁÁ® ÀÖ´Ù. À¯´Ð½º¶ó´Â À̸§Àº ±× ÀÌÀüÀÇ ½Ã½ºÅÛÀÎ ¸Öƽ½º¿¡ ±â¹ÝÀ» µÎ°í ÁöÀº ÀÏÁ¾ÀÇ ¸»Àå³­À̾ú´Ù. 1974³â¿¡ À¯´Ð½º´Â C ¾ð¾î·Î ¾²¿©Áø ÃÖÃÊÀÇ ¿î¿µÃ¼°è°¡ µÇ¾ú´Ù. À¯´Ð½º´Â ¿©·¯ ȸ»çµéÀ̳ª ´ëÇÐ ¹× °³Àε鿡 ÀÇÇØ ¸¹Àº È®ÀåÆÇ°ú »õ·Î¿î ¾ÆÀ̵ð¾îµéÀÌ ´Ù¾çÇÑ ¹öÀüÀÇ À¯´Ð½º¿¡ Ãß°¡µÊÀ¸·Î½á, ´ëÇü ÇÁ¸®¿þ¾î Á¦Ç°ÀÇ ÇÑ Á¾·ù·Î ÁøÈ­ÇÏ¿´´Ù. À¯´Ð½º´Â ¾Õ¼­°¡´Â ƯÁ¤ ÄÄÇ»ÅÍ È¸»çµé¿¡ ÀÇÇØ ¼ÒÀ¯µÈ µ¶Á¡ÀûÀÎ ¿î¿µÃ¼°è°¡ ¾Æ´Ï¾ú´Ù´Â °Í°ú, ¶Ç ±×°ÍÀÌ Ç¥ÁØ ÇÁ·Î±×·¡¹Ö ¾ð¾î·Î ÀÛ¼ºµÇ°í, ´ëÁßÀûÀÎ ¸¹Àº ¾ÆÀ̵ð¾î¸¦ ¹Þ¾Æµé¿´´Ù´Â ÀÌÀ¯ ¶§¹®¿¡, ´©±¸¿¡ ÀÇÇؼ­µµ °³¼±µÇ°í °­È­µÉ ¼ö ÀÖ´Â ÃÖÃÊÀÇ °³¹æÇü Ç¥ÁØ ¿î¿µÃ¼°è°¡ µÇ¾ú´Ù. ´Ù¾çÇÑ ¹öÀüÀÇ À¯´Ð½º·ÎºÎÅÍ ³ª¿Â C ¾ð¾î¿Í ½© ÀÎÅÍÆäÀ̽ºÀÇ º¹ÇÕü´Â IEEEÀÇ ÂùÁ¶ ÇÏ¿¡¼­ POSIX·Î Ç¥ÁØÈ­µÇ¾ú´Ù. POSIX ÀÎÅÍÆäÀ̽ºµéÀº ¹ø°¥¾Æ °¡¸ç, X/Open ÇÁ·Î±×·¡¹Ö °¡À̵å 4.2 ("´ÜÀÏ À¯´Ð½º ±Ô°Ý"°ú "À¯´Ð½º95"·Î ¾Ë·ÁÁ® ÀÖ´Ù)¿¡ ¸í±âµÇ¾ú´Ù. ´ÜÀÏ À¯´Ð½º ±Ô°ÝÀÇ ¹öÀü2´Â À¯´Ð½º98·Îµµ ¾Ë·ÁÁ® ÀÖ´Ù. À¯´Ð½ºÀÇ °ø½ÄÀûÀÎ µî·Ï»óÇ¥´Â ÇöÀç »ê¾÷Ç¥ÁرⱸÀÎ ¿ÀÇ ±×·ìÀÌ ¼ÒÀ¯ÇÏ°í ÀÖÀ¸¸ç, À¯´Ð½º °ü·Ã Á¦Ç°µéÀÇ ÀÎÁõ°ú »óÇ¥ºÎ¿© µîÀ» °üÀåÇÏ°í ÀÖ´Ù.
À¯´Ð½º ¿î¿µÃ¼°è´Â ³Î¸® ÆÇ¸ÅµÈ ½ã¸¶ÀÌÅ©·Î½Ã½ºÅÛÁî(Solaris), ½Ç¸®Äܱ׷¡ÇȽº(IRIX), IBM(AIX), ±×¸®°í ±× ¿Ü ¸¹Àº ȸ»çµéÀÇ ¿öÅ©½ºÅ×ÀÌ¼Ç Á¦Ç°µé¿¡¼­ »ç¿ëµÈ´Ù. À¯´Ð½º ȯ°æ°ú Ŭ¶óÀ̾ðÆ®/¼­¹ö ÇÁ·Î±×·¥ ¸ðµ¨Àº ÀÎÅÍ³Ý °³¹ß°ú ³×Æ®¿öÅ© Áß½ÉÀÇ ÄÄÇ»Æà ±¹¸éÀ» »õ·ÎÀÌ Çϱâ À§ÇÑ Áß¿äÇÑ ¿ä¼Ò¿´´Ù. À¯´Ð½º¿¡¼­ ÆÄ»ýÇÏ¿©, ÇöÀç ¹«·á ¼ÒÇÁÆ®¿þ¾î¿Í »ó¿ë¹öÀüÀÌ ¸ðµÎ Á¸ÀçÇÏ´Â ¸®´ª½º´Â µ¶Á¡ ¿î¿µÃ¼°èÀÇ ´ë¾ÈÀ¸·Î¼­ ¸í¼ºÀ» ´õÇØ°¡°í ÀÖ´Ù.

2. À¯´Ð½ºÀÇ Æ¯Â¡

- ¸ÖƼŽºÅ·°ú ¸ÖƼÀ¯Àú Áö¿ø
- ¿ëÀÌÇÑ À̽ļº
- °èÃþÀû ÆÄÀÏ ½Ã½ºÅÛ ±¸Á¶ (Hierarchical File System)
- Security ¹× Protection ±â´É
- ÀÔÃâ·ÂÀÇ ¹æÇâ Àüȯ ¹× ÆÄÀÌÇÁ ±â´É
- È®À强°ú Á¶Á÷¼ºÀÌ Ç³ºÎÇÑ Shell
- °¢Á¾ Special DevicesÀÇ µ¶¸³¼º
- À¯¿¬¼º ÀÖ´Â Ä¿¹Â´ÏÄÉÀ̼ÇÀ» ÇÒ ¼ö ÀÖ´Â ¿î¿µÃ¼Á¦
- ¾ð¾î ¹× À¯Æ¿¸®Æ¼°¡ ´Ù¾çÇÏ¿© ÇÁ·Î±×·¥ °³¹ßÀÌ ¿ëÀÌ

3. UNIXÀÇ ±¸¼º¿ä¼Ò

1) Kernel : UnixÀÇ ÇÙÀ̸ç File system, Device, Memory, Process °ü¸®.
2) Shell : Command Interpreter·Î »ç¿ëÀÚ¿Í Ä¿³Î°£ÀÇ ÀÎÅÍÆäÀ̽º ¿ªÇÒ°ú ¸í·ÉÀ» Çؼ®.
3) File System (Directory Tree)
ÆÄÀÏ ½Ã½ºÅÛÀº Ä¿³ÎÀÌ µ¥ÀÌÅ͸¦ °ü¸®Çϱâ À§ÇÑ ÆÄÀÏ ¶Ç´Â µð·ºÅ͸®ÀÇ °ü¸® ±¸Á¶ÀÌ´Ù.

4. UNIXÀÇ Á¾·ù

- Sun OS : ½ã ¸¶ÀÌÅ©·Î½Ã½ºÅÛÁî¿¡¼­ Á¦°øÇÏ´Â BSD °è¿­ÀÇ UNIX
- Solaris : ½ã ¸¶ÀÌÅ©·Î½Ã½ºÅÛÁî¿¡¼­ Á¦°øÇÏ´Â System V °è¿­ÀÇ UNIX
- HP/UX : HPÀÇ UNIX ½Ã½ºÅÛÀº OSF/1(Open Software Foundation)ÀÇ ¿©·¯ Ư¡À» µµÀÔÇÑ System VÀÇ º¯ÇüµÈ ÇüÅÂ
- AIX : IBM¿¡¼­ System V release 4ÀÇ 4.4 BSD ¹öÀü°ú OSF/1À» ±â¹ÝÀ¸·Î ¸¸µé¾î³½ UNIX
- Digital UNIX: OSF±×·ì¿¡¼­ System VR3°ú 4.3 BSD¹öÀüÀ» °áÇÕ½ÃÅ°°í OSF/1À» ±â¹ÝÀ¸·Î ¹ßÀüµÈ DEC(ÇöÀç Compaq)ÀÇ UNIX
- IRIX : ½Ç¸®ÄÜ ±×·¡ÇȽº¿¡¼­ BSD¿Í System V°è¿­ÀÇ UNIX¸¦ ±â¹ÝÀ¸·Î ¸¸µé¾îÁø UNIX

5. Solaris OS

4.2 ¹öÀü±îÁö BSD¸¦ ¸¸µé´ø ¹öŬ¸®ÀÇ ºô Á¶ÀÌ°¡ ½ã ¸¶ÀÌÅ©·Î½Ã½ºÅÛÁî·Î ¿Å°Ü°¡¼­ ¸¸µç °ÍÀÌ SUN OSÀÌ¸ç ½ã ¸¶ÀÌÅ©·Î½Ã½ºÅÛÁî°¡ AT&TÀÇ System V release 4.0ÀÇ ¶óÀ̼±½º¸¦ ¹Þ¾Æ ¸¸µç °ÍÀÌ SolarisÀÌ´Ù.

1) ¹öÀü°£ÀÇ °ü°è
Solaris 2.x = Sun OS 5.x + Open Windows + ONC+(Open Network Computing: NFS, NIS, NIS+µî)
Solaris 7 = Sun OS 5.7 + Open Windows, CDE(Common Desktop Env) + ONC+(Open Network Computing: NFS, NIS, NIS+µî)
Solaris 8 = Sun OS 5.8 + OpenWindows, CDE(Common Desktop Env) + ONC+(Open Network Computing: NFS, NIS, NIS+µî)
Solaris 9 = Sun OS 5.9 + OpenWindows, CDE(Common Desktop Env) + ONC+(Open Network Computing: NFS, NIS, NIS+µî)

2) Àåºñ º° Áö¿ø OS ¹öÀü

SunOS 5.x = Solaris 2.x
Sun dropped the "2." when Solaris (2.)7 came out.
I.e. Solaris 7 = "Solaris 2.7" = SunOS 5.7,
Solaris 8 = "Solaris 2.8" = SunOS 5.8 and so on.

Sun2: SunOS 4.0.3 or earlier.
Sun386i: SunOS 4.0, 4.0.1, 4.0.2 only.
Sun3: SunOS 4.1.1 or earlier.
4/100, 4/200 series: SunOS 3.2, SunOS 4.0 through 5.4
4/300 series: SunOS 4.0.3 through 5.4
4/400 series: SunOS 4.1PSR_A through 5.4
600 models 120, 140: SunOS 4.1.2 through 5.5.1
600 model 41, 51: SunOS 4.1.3 through 5.5.1
SPARCstation 1, 1+, SLC, IPC: SunOS 4.0.3 through 5.7
SPARCstation 2, ELC, IPX: SunOS 4.1.1 through 5.7
SPARCstation 4: SunOS 4.1.4 or later.
SPARCstation 5: SunOS 4.1.3_U1B or later.
SPARCstation 10 models 20, 30, 40, 41, 51, 61, 71: SunOS 4.1.3 or later.
SPARCstation 20 models 50, 51, 61, 71: SunOS 4.1.3_U1B or later.
SPARCstation 20 model HS11, HS21, 151: SunOS 4.1.4 or later.
SPARCclassic, SPARCstation LX: SunOS 4.1.3C or later.
SPARCstation Voyager: Solaris 2.3 edition II or later.
Ultra 1 model 140, 170: Solaris 2.5 or later.
Ultra 1 model 140E, 170E, 200E: Solaris 2.5.1 or later.
Ultra 2: Solaris 2.5.1 or later.
Ultra 5, 10, 30, 60, 250, 450: Solaris 2.5.1HW1297 or Solaris 2.6HW0398 or later.
Ultra Enterprise: Solaris 2.5.1 or later.
SunBlade 100, SunBlade 1000, SunFire 280R: Solaris 8HW1000 or later.
SunFire 3800, 4800, 4810, 6800: Solaris 8HW0401 or later.

- OS ¹öÀüÀÇ È®ÀÎ
# uname -a
SunOS sonamu 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-1

- ¼Ö¶ó¸®½º Á¤º¸
¼Ö¶ó¸®½º 9
http://kr.sun.com/products/software/os_platforms/solaris/index.html
¼Ö¶ó¸®½º 8
http://kr.sun.com/products/software/os_platforms/solaris/8/index.html
Àüü ¹öÀü °£ÀÇ Â÷ÀÌ ºñ±³
http://wwws.sun.com/software/solaris/fcc/fcc.html
¼Ö¶ó¸®½º x86(Intel) Çϵå¿þ¾î ȣȯ ¸®½ºÆ®(HCL)
http://www.sun.com/bigadmin/hcl/


6. SUN & Solaris °ü·Ã »çÀÌÆ®

1) ½ã °ü·Ã ·¹ÆÛ·±½º (Ãßõ)
http://www.stokely.com/unix.sysadm.resources/faqs.sun.html

2) ½ã °ø½Ä µµÅ¥¸ÕÆ®
http://docs.sun.com
http://www.sun.com/bigadmin/ (BigAdmin System Administration Portal)

3) SUN°ü·Ã FAQ
http://www.science.uva.nl/pub/solaris/solaris2.html (Solaris2 FAQ)
http://www.mreriksson.net/faqs/solaris8/ (Ola Eriksson's FAQ for Sun Solaris )
http://wks.uts.ohio-state.edu/sun/faqs/s86faq.html ( Intel FAQ)
http://item-hunter.com/~chang/src/lecture/faq/sol2faq.html (ÇѱÛ)
http://hawk.com.kyungnam.ac.kr/~opti21/unix/faq/index.html (han.comp.sys.sun FAQ ÇѱÛ)

4) Sun Managers Summaries & Archives Search
http://www.sunmanagers.org ( °ø½Ä ȨÆäÀÌÁö)
http://www.sunmanagers.org/archives.html ( ¾ÆÄ«ÀÌºê ¸®½ºÆ®)
http://www.latech.edu/sunman-search.html ( ¾ÆÄ«ÀÌºê °Ë»ö)
http://news.google.co.kr ( ¸ðµç ´º½º ±×·ì °Ë»ö)

5) Àåºñ °ü·Ã
http://sunsolve.sun.com/handbook_pub/Systems/ ( SUN ½Ã½ºÅÛ ÇÚµåºÏ)
http://sunsolve.sun.com/handbook_pub/Devices/ ( SUN ºÎºÕº° ÇÚµåºÏ)


2ºÎ. ¼Ö¶ó¸®½ºÀÇ Á¢±Ù°ú »ç¿ëÀÚ °ü¸®

1. ½Ã½ºÅÛÀÇ Á¢±Ù

1) Consol·Î Á÷Á¢ ·Î±×Àΰú telnet, rsh, ssh (Shell »ç¿ë), Xmanager(Windows »ç¿ë) µîÀÇ ¿ø°Ý ·Î±×ÀÎ
- telnet : ÀÌ ±âÁ¾°£ÀÇ ½Ã½ºÅÛ Á¢±Ù °¡´É ( Port 23)
- rsh : Unix ±âÁ¾°£ÀÇ ½Ã½ºÅÛ Á¢±Ù °¡´É
- ssh: Unix ±âÁ¾°£ÀÇ ½Ã½ºÅÛ Á¢±Ù °¡´É (º¸¾È½©, Port 22)
http://www.openssl.org
http://www.openssh.org

2) ½Ã½ºÅÛ »ç¿ëÀÚ: root¿Í ÀÏ¹Ý »ç¿ëÀÚ
root: ½´ÆÛÀ¯Àú, ½Ã½ºÅÛ ¾îµå¹Î, Ãʱ⠼³Ä¡ ½Ã Æнº¿öµå °áÁ¤, ¸ðµç ±ÇÇÑ, ±âº»½©Àº /sbin/sh
ÀϹÝÀ¯Àú: ÀϹݻç¿ëÀÚ.

3) °ü·Ã ÆÄÀÏ
/etc/passwd ÆÄÀÏ
user1:x:102:10:User Account 1: /export/home/user1:/bin/ksh
/etc/shadow ÆÄÀÏ
user01:haN3NqcDfof.2:::::::
/etc/group ÆÄÀÏ
other::1:user01,user02

4) »ç¿ëÀÚ °ü¸®
/usr/bin/passwd ¸í·É : ÀÚ½ÅÀÇ Æнº¿öµå º¯°æ (ÀÏ¹Ý À¯Àú), ´Ù¸¥ »ç¿ëÀÚÀÇ Æнº¿öµå º¯°æ(root)
* Æнº¿öµå »ý¼º ±ÔÄ¢(ÀϹÝÀ¯Àú)
- 6~8 ¹®ÀÚ
- µÎ °³ÀÇ ¾ËÆĺª°ú ÇϳªÀÇ Æ¯¼ö¹®ÀÚ ¶Ç´Â ¼ýÀÚ Æ÷ÇÔ
- ·Î±ä À̸§°ú ´Ù¸£°Ô
- º¯°æ Àü Æнº¿öµå¿Í ´Ù¸£°Ô
- °ø¹éÀ» Æ÷ÇÔÇÒ ¼ö ÀÖ´Ù.

/usr/sbin/groupadd ¸í·É : ±×·ìÀ» »ý¼º ( GID´Â 100 ~ 60000 ¹ø±îÁö)
ex) # groupadd -g 100 class1

/usr/sbin/useradd ¸í·É : À¯Àú¸¦ »ý¼º ( UID´Â 100 ~ 60000 ¹ø±îÁö)
ex) # useradd -u 501 -g 100 -d /export/home/user01 -m -c "User Account 1" -s /bin/ksh user01

/usr/sbin/groupdel ¸í·É : ±×·ìÀ» Á¦°Å
ex) # groupdel class1

/usr/sbin/userdel ¸í·É: À¯Àú¸¦ Á¦°Å
ex) # userdel [-r] user01

/usr/sbin/usermod, /usr/sbin/groupmod ´Â ¼öÁ¤ ½Ã »ç¿ë

* ¾îµå¹Î GUI Åø : »ç¿ëÀÚ, ±×·ì, È£½ºÆ®, ÇÁ¸°ÅÍ, Á÷·ÄÆ÷Æ®, ¼ÒÇÁÆ®¿þ¾î, 14(sysadmin) ±×·ìÀº »ç¿ë°¡´É.
/usr/bin/admintool


3ºÎ. »ç¿ëÀÚ ±âº» ¸í·É

»ç¿ëÀÚ ±âº»¸í·ÉÀº ´ÙÀ½À» Âü°íÇÑ´Ù.
http://www.gohtml.pe.kr/lec/unix1.html
http://unix.co.kr/data/solaris/?p=16
http://whoami21.com/~kimlee/telnet1.htm
http://www.hwaseong.ms.kr/unix1.htm

1. Á¤º¸ Ãâ·Â

1) ½Ã½ºÅÛ À̸§ ¹× OS¹öÀü È®ÀÎ
$ uname -a
$ cat /etc/release (=> OSÀÇ ¸±¸®Áî È®ÀÎ)

2) ÇöÀç ·Î±×ÀÎÇÑ »ç¿ëÀÚ Á¤º¸
$ who (/var/adm/utmpx)

3) ÃÖ±Ù ·Î±äÇß´ø »ç¿ëÀÚ Á¤º¸ + Àç ºÎÆà Á¤º¸
$ last (/var/adm/wtmpx)
$ last user01
$ last reboot

4) ÇÁ·Î¼¼½º Á¤º¸
$ ps -ef | grep netscape
$ pgrep netscape (solaris 8ºÎÅÍ)

5) ³¯Â¥ ¹× ½Ã°£ Ãâ·Â
$ date
$ cal

6) ¸Ç ÆäÀÌÁö
$ man man
$ man -k calendar
cf. # catman -w (°ü¸®ÀÚ root°¡ ½ÇÇà)
$ man -s5 man (5 section manual)

- Section Definition -
°ü·Ã ÆÄÀÏ: /usr/share/man/man.cf, /usr/share/man/entities/*
1: User Commands
1M: System Administration Commands
2: System Calls
3: Basic Library Functions
4: File Formats
5: Standards, Environments and Macros
6: Demos
7: Device and Network Interfaces
9: Device Driver Interfaces

- ¸ÇÆäÀÌÁö À§Ä¡
/usr/share/man/
/usr/openwin/man/
/usr/dt/man

- ¸ÇÆäÀÌÁö Ãß°¡
# vi /etc/profile
...
MANPATH=/usr/share/man:/usr/openwin/man:/usr/dt/man:<Ãß°¡ÇÒ ¸ÇÆäÀÌÁö µð·ºÅ丮>
export MANPATH

2. ÆÄÀÏ°ú µð·ºÅ丮 Á¢±Ù

ÁÖÀÇ - ÆÄÀÏ°ú µð·ºÅ丮, ¸í·É µîÀº ¸ðµÎ ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÑ´Ù.

1) ÆнºÀ̸§
- Àý´ë°æ·Î(Absolute Path Name) : root(/)¸¦ ±âÁØÀ¸·Î ±â¼ú, /usr/local/src/file1
- »ó´ë°æ·Î(Relative Path Name) : ÇöÀç µð·ºÅ͸®¸¦ ±âÁØÀ¸·Î .¶Ç´Â ..À¸·Î ±â¼ú, dir1/subdir1/file2

2) °ü·Ã ¸í·É¾î
- ls(list) : ÆÄÀÏ ¶Ç´Â µð·ºÅ͸®ÀÇ ¸®½ºÆ®¸¦ Ãâ·Â
- pwd(print working directory) : ÇöÀç ÀÛ¾÷ µð·ºÅ͸®ÀÇ À§Ä¡¸¦ Ãâ·Â
- cd(change directory) : ÀÛ¾÷ µð·ºÅ丮¸¦ º¯°æ

3. ÆÄÀÏ°ú µð·ºÅ丮¸¦ ´Ù·ç´Â ¸í·É

- file : ÆÄÀÏ Å¸ÀÔÀ» È®ÀÎ (text, data, executable or binary)
- cat(catenate) : ÁַΠªÀº textÆÄÀÏÀ» º¼ ¶§
- more : ÁÖ·Î ±ä textÆÄÀÏÀ» º¼ ¶§
- strings: ¹ÙÀ̳ʸ® ÆÄÀÏÀÇ ¹®ÀÚ¿­¸¸ º¸°íÀÚ ÇÒ ¶§
- head: textÆÄÀÏÀÇ ¸Ó¸®ºÎºÐ(µðÆúÆ® 10ÁÙ)¸¸ º¸°íÀÚ ÇÒ ¶§
- tail: textÆÄÀÏÀÇ ³¡ºÎºÐ(µðÆúÆ® 10ÁÙ)¸¸ º¸°íÀÚ ÇÒ ¶§ (tail -f /var/log/messages)
- wc(word count) : textÆÄÀÏÀÇ ¶óÀÎ ¼ö, ´Ü¾î ¼ö, ¹®ÀÚ ¼ö¸¦ ¾Ë°íÀÚ ÇÒ ¶§ ( wc file1)
- touch : ºó ÆÄÀÏÀ» »ý¼ºÇÒ ¶§
- tee : È­¸é Ãâ·Â°ú ÆÄÀÏ ÀúÀåÀ» µ¿½Ã¿¡ ÇÏ°íÀÚ ÇÒ ¶§ (ls -lR | tee logfile | more)
- mkdir : µð·ºÅ丮¸¦ »ý¼ºÇÒ ¶§
- rmdir : ºó µð·ºÅ丮¸¦ Á¦°ÅÇÒ ¶§
- rm -r : µð·ºÅ丮¸¦ Á¦°ÅÇÒ ¶§
- cp : ÆÄÀÏÀ» º¹»çÇÒ ¶§
- cp -r : µð·ºÅ丮¸¦ º¹»çÇÒ ¶§
- mv : ÆÄÀÏ ¶Ç´Â µð·ºÅ丮¸¦ À̸§º¯°æ ¶Ç´Â ¿Å±æ ¶§

4. ÆÄÀÏ°ú ÅؽºÆ® °Ë»ö

- find : ÆÄÀÏ ¶Ç´Â µð·ºÅ丮¸¦ ãÀ» ¶§
$ find / -name core
$ find ~ -name core -exec rm {} \;
$ find . -mtime +90
$ find ~ -size +57
$ find /usr -name '*tif'
- cmp, diff : µÎ ÆÄÀÏÀÇ Â÷À̸¦ ºñ±³ÇÒ ¶§
- sort : ÆÄÀÏÀÇ ³»¿ë ¶Ç´Â ¸®½ºÆ®¸¦ Á¤·ÄÇÒ ¶§
$ ls -l | sort
$ du -ks /etc/* | sort -nr
- grep : ÆÄÀÏÀÇ Æ¯Á¤ ¹®ÀÚ¿­ÀÌ ÀÖ´Â ¶óÀÎÀ» Ãâ·Â
$ grep user01 /etc/passwd
$ ps -ef | grep ksh

5. ÆÄÀÏÀÇ º¸¾È

$ ls -l
-rw-r--r-- 1 borisu staff 8239 2002³â 8¿ù 29ÀÏ backup.txt
-rw-r--r-- 1 borisu staff 2361 2002³â 9¿ù 3ÀÏ memo.txt
drwx------ 5 borisu staff 512 5¿ù 20ÀÏ 11:55 shell/
-rw-r--r-- 1 borisu staff 1660 4¿ù 25ÀÏ 01:37 ssh-setup.sh

File Type: -, f , d, c, b
Permission: read(r:4), write(w:2), execute(x:1)
User, Group, Others

1) ÆÛ¹Ì¼Ç ¼³Á¤
$ chmod u+x file1 (symbolic mode)
$ chmod a=rx file1 (symbolic mode)
$ chmod 644 file1 (octal mode)

2) ¼ÒÀ¯±Ç º¯°æ (root)
# chown user01 file1 (ÆÄÀÏ ¼ÒÀ¯ÀÚ º¯°æ ½Ã)
# chgrp class1 file1 (ÆÄÀÏ ±×·ì ¼ÒÀ¯ÀÚ º¯°æ ½Ã)
# chown -R user01:class1 dir1 (µð·ºÅ丮 º¯°æ ½Ã)

3) umask : ±âº» ÆÛ¹Ì¼Ç Á¦ÇÑ
$ umask (È®ÀÎ)
$ touch file1
$ mkdir dir1
$ umask 027 (Àç¼³Á¤)
$ touch fie2
$ touch dir2

6. Visual Editor (VI)

À¯´Ð½ºÀÇ ±âº» ÆíÁý±â´Â vi°¡ ÀÖ°í, ±×¹Û¿¡ emacs µîÀÌ ÀÖ´Ù. GUI·Î´Â dtpad°¡ ÀÖ´Ù.

- viÀÇ ¼¼°¡Áö ¸ðµå
Command Mode (¸í·É ¸ðµå)
Edit Mode (ÆíÁý ¸ðµå)
Last Line Mode (¸¶Áö¸· ¸í·É ¶óÀÎ ¸ðµå)

- vi ·¹ÆÛ·±½º Ä«µå ¹× ¸Þ´º¾ó
http://kldp.org/ÀÀ¿ë_ÇÁ·Î±×·¥/¿¡µðÅÍ/Vi/


7. Archiving User Data

1) Archive °ü·Ã ¸í·É

tar - Creates and extracts files from a tape device or file archive
compress, uncompress - Compress and uncompress a file
zcat - Uncompress a compressed file and sends the output to the screen without changing the compressed file.
gzip, gunzip - Compresses and uncompressed
gzcat - Uncompress a gzipped file and sends the output to the screen without changing the gzipped file
zip, unzip - Packages and compresses files and uncompressed files.
jar - Packages and comresses multiple files to a single archive file
cpio - Copies and extracts files fro a file archive or tape device.

[ tar ]

³»¿ë¸¸ º¼ ¶§: tar tvf name.tar
Ç® ¶§ : tar xvf name.tar
¸¸µé ¶§ : tar cvf name.tar file1 file2 file3
tar cvf name.tar dir1

$ cd
$ mkdir testdir
$ cd testdir
$ cp /etc/profile file1
$ man ls | col -b > file2
$ tar cvf first.tar file1 file2
$ rm file? ; ls
$ tar tvf first.tar
$ tar xvf first.tar

$ cd ..
$ tar cvf second.tar testdir
$ rm -rf testdir
$ tar tvf second.tar
$ tar xvf second.tar

[ compress & uncompress ]

$ compress second.tar
$ ls
$ uncompress second.tar.Z
$ tar xvf second.tar

cf. zcat second.tar.Z | tar xvf -
cf. compress -dc second.tar.Z | tar xvf -
cf. uncompress -c second.tar.Z | tar xvf -

[ gzip ]

$ cd
$ cd ..
$ ls
$ tar cvf /var/tmp/myhome.tar user01
$ cd /var/tmp; ls
$ gzip myhome.tar
$ ls

$ gzip -d myhome.tar.gz
$ tar tvf myhome.tar
$ tar xvf myhome.tar

cf. gzcat myhome.tar.gz | tar xvf -
cf. gzip -dc myhome.tar.gz | tar xvf -
cf. gunzip -c myhome.tar.gz | tar xvf -
cf. gtar xvfz myhome.tar.gz

[ jar ]
$ jar cvf dir1.jar dir1
$ jar tvf dir1.jar
$ jar xvf dir1.jar

8. ¿ø°ÝÁö Á¢¼Ó

¿ø°ÝÁö Á¢¼ÓÀº telnet, rlogin, ftp, sshµîÀÌ ÀÖ´Ù.

1) telnet
¿ø°Ý È£½ºÆ®ÀÇ user name°ú password°¡ ÇÊ¿ä
$ telnet host1
...(Á¢¼ÓÇؼ­ »ç¿ë)
$ exit (·Î±× ¾Æ¿ô)

2) rlogin

¿ø°Ý È£½ºÆ®¿¡¼­ Çã¶ôµÈ È£½ºÆ® ¶Ç´Â À¯ÀúÀÇ °æ¿ì Æнº¿öµå°¡ ÇÊ¿ä ¾ø´Ù.
ÀÚ¼¼ÇÑ »ç¿ë¹ýÀº ´ÙÀ½À» Âü°íÇÑ´Ù.
http://nscp.upenn.edu/aix4.3html/cmds/aixcmds4/rlogin.htm

- ÀϹÝÀ¯Àú: /etc/hosts.equiv, $HOME/.rhosts
- root : /.rhosts
- ÆÄÀÏ Çü½Ä : È£½ºÆ® ¸í À¯Àú

$ rlogin host2
...(Á¢¼ÓÇؼ­ »ç¿ë)
$ exit (·Î±× ¾Æ¿ô)

cf. rsh host1 hostname
cf. rcp file1 host1:/tmp

3) ssh (secure Shell)

¸í·É¾î: ssh, scp, sftp
°ü·Ã»çÀÌÆ®:
http://www.openssl.org
http://www.openssh.org
°ü·Ã ¹®¼­:
ssh howto
http://kldp.org/~eunjea/ssh/index.html
ssh install for solaris
http://www.sunfreeware.com/openssh.html

4) ftp

[ Á¢¼Ó ¹× ¿¬°á ²÷±â ]

1) ÀÏ¹Ý À¯Àú·Î ·Î±ä
$ ftp server_name
¶Ç´Â
$ ftp
ftp> open server_name
ftp> user login_id
ftp> close
ftp> open new_server
ftp> quit

2) Anonymous ·Î±ä
$ ftp server_name
Login: ftp ( or anonymous)
password: user01@suned.co.kr

[ ±âº» ¼³Á¤ ¿É¼Ç ]

ftp> hash (on/off: Àü¼Û»óŸ¦ Ç¥½Ã)
ftp> ver (on/off: Verbose mode)
ftp> bin (Binary mode)
ftp> asc (ASCII mode)
ftp> prompt (on/off: ´ÙÁß ÆÄÀÏ Àü¼Û½Ã ÇÁ·ÒÇÁÆ® on/off)

[ ±âº» ¸í·É ]

ftp> cd (µð·ºÅ丮¸¦ ¿Å±æ ¶§: REMOTE )
ftp> ls (µð·ºÅ丮 ³»¿ëÀ» º¼ ¶§: REMOTE )
ftp> pwd (ÇöÀç µð·ºÅ丮 À§Ä¡ È®ÀÎ: REMOTE)

ftp> lcd (µð·ºÅ丮¸¦ ¿Å±æ ¶§: LOCAL )
ftp> !ls (µð·ºÅ丮 ³»¿ëÀ» º¼ ¶§: LOCAL )
ftp> !pwd (ÇöÀç µð·ºÅ丮 À§Ä¡ È®ÀÎ: LOCAL)
ftp> ! (Shell·Î Àá½Ã ºüÁ®³ª°¨: LOCAL)

[ ÆÄÀÏ Àü¼Û ]

ftp> get remote_file [local_file] (¹ÞÀ» ¶§)
ftp> mget file1 file2 file3 file4 (¿©·¯ ÆÄÀÏÀ» ¹ÞÀ» ¶§)

ftp> put local_file [remote_file] (¿Ã¸± ¶§)
ftp> mput file1 file2 file3 file4 (¿©·¯ ÆÄÀÏÀ» ¹ÞÀ» ¶§)

[ ±âŸ ¸í·É¾î ]

ftp> del file_name (ÆÄÀÏ Áö¿ì±â: REMOTE)
ftp> mkdir dir_name (µð·ºÅ丮 ¸¸µé±â: REMOTE)
ftp> help (µµ¿ò¸» º¸±â: REMOTE)

5) X ¼­¹ö·ÎÀÇ Á¢±Ù
À©µµ¿ì¿ë ClientÇÁ·Î±×·¥À¸·Î´Â Xmanager°¡ À¯¸íÇÏ´Ù. ´ÙÀ½ ¹®¼­¸¦ ÂüÁ¶ÇÑ´Ù.
- »ç¿ë¹ý
http://compedu.inue.ac.kr/~chlee56/wowlinux/xmanager.htm
- ´Ù¿î·Îµå
http://netsarang.co.kr/download/download.html

9. ½Ã½ºÅÛ ÇÁ·Î¼¼½º

process : ÇÁ·Î±×·¥ÀÌ ¸Þ¸ð¸®¿¡ ¿Ã¶ó¿Í µ¿ÀÛÇÏ°í ÀÖ´Â »óÅÂ.
PID : ÇÁ·Î¼¼½ºÀÇ °íÀ¯ ID (Ä¿³ÎÀÌ °ü¸®)
Daemon: ¹é±×¶ó¿îµå·Î ½ÇÇà, ºÎÆà ½Ã µ¿ÀÛ, ¼­¹ö ÇÁ·Î¼¼½º

1) ÇÁ·Î¼¼½º Á¤º¸
$ ps -ef | more
UID PID PPID C STIME TTY TIME CMD
root 0 0 0 4¿ù 25 ? 0:00 sched
root 1 0 0 4¿ù 25 ? 0:05 /etc/init -
root 2 0 0 4¿ù 25 ? 0:00 pageout
root 3 0 0 4¿ù 25 ? 86:09 fsflush
root 279 1 0 4¿ù 25 ? 0:00 /usr/lib/saf/sac -t 300
root 204 1 0 4¿ù 25 ? 0:00 /usr/lib/utmpd
root 134 1 0 4¿ù 25 ? 0:02 /usr/sbin/rpcbind
$ ps -ef | grep lp
$ pgrep -l lp (solaris 8ºÎÅÍ)

2)ÇÁ·Î¼¼½º Á¾·á

- ½Ã±×³Î Á¤ÀÇ
$ man -s 3HEAD signal

Name Value Default Event
SIGHUP 1 Exit Hangup (see termio(7I))
SIGINT 2 Exit Interrupt (see termio(7I))
SIGKILL 9 Exit Killed
SIGTERM 15 Exit Terminated (==> Control + C)

- ÇÁ·Î¼¼½º Á¾·á
$ kill [-signal] PID ...
$ kill <PID>
$ kill -9 <PID>
$ kill -KILL <PID>
$ pgrep -l mail
215 sendmail
12047 dtmail
$ kill 12047
$ pkill -KILL ÇÁ·Î¼¼½º À̸§

- ÀÚ½ÅÀÌ »ç¿ëÇÏ´Â ¿öÅ©½ºÅ×À̼ÇÀÌ À©µµ¿ì hang½Ã 󸮿ä·É
´Ù¸¥ ½Ã½ºÅÛ¿¡¼­ ´ÙÀ½°ú °°ÀÌ ÇÑ´Ù.
$ telnet (¶Ç´Â rlogin) host1
$ pkill -9 <ÀÚ½ÅÀÇ ½©À̸§, ex) ksh>
¶Ç´Â
$ pkill -KILL <ÀÚ½ÅÀÇ ½©À̸§ ex) ksh>

3) Àâ Á¦¾î ( Job Control )
¿©·¯ °³ÀÇ ÀÛ¾÷À» ¼öÇàÇÏ°í À̸¦ Á¦¾îÇÒ ¼ö ÀÖ´Ù. ´Ü º»½©(sh)´Â ºÒ°¡

$ find . -name core > list & ( JobÀ» background·Î ½ÇÇà)
$ jobs ( JobÀ» È®ÀÎ)
[1] = running find . -name core > list &
$ fg %1 ( ¹é±×¶ó¿îµå ÀâÀ» Æ÷±×¶ó¿îµå·Î)
Control + Z ( Æ÷±×¶ó¿îµå ÀâÀ» ÁßÁö)
$ jobs ( jobÀ» È®ÀÎ)
$ bg %1 (ÁßÁöµÈ ÀâÀ» ¹é±×¶ó¿îµå·Î ½ÇÇà)
$ kill %1 (ÀâÀ» Á¾·á)


10. ½© (Shell)

¸í·ÉÇؼ®±â, »ç¿ëÀÚ ÀÎÅÍÇÁ¸®ÅͶó°íµµ ÇÑ´Ù. ½© °¢°¢ÀÇ ÀÚ¼¼ÇÑ ¹®¼­´Â ´ÙÀ½À» Âü°íÇÑ´Ù.
http://dir.yahoo.com/Computers_and_Internet/Software/Operating_Systems
/UNIX/Shells/



Shell Á¾·ù Shell ÇÁ·Î±×·¥ À§Ä¡ ÇÁ·ÒÇÁÆ® ÇÁ·ÒÇÁÆ® º¯¼ö ½©ÃʱâÈ­ ÆÄÀÏ
Bourn Shell /bin/sh, /sbin/sh #, $ PS1 /etc/profile, $HOME/.profile
Korn Shell /bin/ksh #, $ PS1 /etc/profile, $HOME/.profile, $HOME/.kshrc
C Shell /bin/csh hostname#, hostname% prompt /etc/.login, $HOME/.cshrc, $HOME/.login


- ÇöÀç »ç¿ë½© È®ÀÎ
$ ps
$ echo $SHELL
- ±âŸ ½©
bash, tcsh, zsh, ssh
- °ü·Ã µð·ºÅ丮
/etc/skell : »ùÇà ÃʱâÈ­ ÆÄÀÏ À§Ä¡

1) ÀÔÃâ·ÂÀÇ Àüȯ
$ mailx user1 < ~/myfile ( ÀÔ·ÂÀÇ ¹æÇâÀ» ÆÄÀϷκÎÅÍ )
$ ps -ef > file_list (Ãâ·ÂÀÇ ¹æÇâÀ» ÆÄÀÏ·Î Àüȯ)
$ cat /etc/passwd >> file_list (Ãâ·ÂÀÇ ¹æÇâÀ» ÆÄÀÏ·Î Àüȯ, append)
$ ls /var /no 1> dat 2>&1

2) ÆÄÀÌÇÁ (ÇÁ·Î¼¼½º °£ Åë½Å)
$ who | wc -l
$ ls -F /etc | grep "/"
$ head -10 file1 | tail -3 | lp
$ ps -ef | tail +2 | wc -l

3) Meta Character
- Backslashes (\)
- Dollar signs ($)
- Back quotation marks (` `)
- quotation marks (' ')
- double quotation marks (" ")

$ rm \*


$ echo '$SHELL'
$ echo "$SHELL"
$ echo "\$SHELL"

$ echo date
$ echo `date`

11. Korn Shell Features

1) Aliases
alias aliasname="command"
ex)
$ alias h=history
$ alias c=clear
$ alias home='cd;ls'
$ alias ls='ls -F'
$ alias copy="cp -r"

2) Command line Editing
- Command line ÆíÁý ±â´É
$ set -o vi
$ [esc] + k (=> vi command mode )

3) History
- 128°³¸¦ À¯Áö ( º¯¼ö HISTSIZE -> .kshrc)
- $HOME/.sh_history (º¯¼ö HISTFILE -> .kshrc)
ex)
$ history ( ÃÖ±Ù 16°³ ¸í·ÉÀ» list)
$ history 23 (23 ~ ÃÖ±Ù¸í·É)
$ history -10 (ÃÖ±Ù ¸í·É 10°³)
cf)
$ r ( °¡Àå ÃÖ±Ù ¸í·É ½ÇÇà)
$ r p ( p·Î ½ÃÀÛµÈ °¡Àå ÃÖ±Ù ¸í·É¾î ½ÇÇà)
$ r 23 ( È÷½ºÅ丮°¡ 23¹øÀÎ ¸í·É¾î ½ÇÇà)

4) Ignore Control-d (ignoreeof)
- Control-dÀÇ ±â´É: 1) EOF, 2) EXIT
ex)
$ ^d
$ set -o ignoreeof (=>¼³Á¤ eof:on, exit:off)
$ ^d
$ set +o ignoreeof (=>ÇØÁ¦ eof:on, exit:on)

5) .profile°ú ºÐ¸®µÈ ÃʱâÈ­ ÆÄÀÏ (.kshrc)
- $HOME/.kshrc (C½©: $HOME/.cshrc)
- ȯ°æº¯¼ö´Â .profile¿¡ ±â·Ï
- ±âŸº¯¼ö ¹× Äܽ© Á¦°ø ±â´É µîÀº .kshrc¿¡ ±â·Ï
ex)
$ . ~/.kshrc ( Àç ÃʱâÈ­ )

6) Job Control
ex)
$ find / -name core -exec rm {} \;
^Z (=> suspend)
[1] + stop ... (=> [1]Àº Àâ¹øÈ£)
$ bg %1 ( 1¹ø ÀâÀ» ¹é±×¶ó¿îµå·Î ½ÇÇà)
$ jobs ( Àâ È®ÀÎ)
$ fg %1 ( 1¹ø ÀâÀ» Æ÷±×¶ó¿îµå·Î ½ÇÇà)
$ ^+C ( Æ÷±×¶ó¿îµå ÀâÀ» Á¾·á)
$ jobs

7) µ¤¾î¾²±â ¹æÁö (noclobber)
ex)
$ touch testfile
$ cat /etc/passwd > testfile
$ cat testfile
$ cat /etc/profile > testfile
$ cat testfile
$ set -o noclobber
$ cat /etc/hosts > testfile ( => °æ°í¸Þ½ÃÁö°¡ ¶³¾îÁü)

12. Korn Shell Initialization

- Korn Shell ÃʱâÈ­ ¼ø¼­

(1) /etc/profile
(2) $HOME/.profile
(3) $HOME/.kshrc


1) $HOME/.profile ¼³Á¤Çϱâ

$ vi ~/.profile

stty cs8 erase '^H' -istrip ( -> Å͹̳Π¼³Á¤ )

PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/usr/ucb (-> Path ¼³Á¤)
EXINIT="set ai nu ts=3 showmode" (-> vi ȯ°æ¼³Á¤)
ENV="$HOME/.kshrc" ( -> .kshrc È®À彩 º¯¼ö ¼³Á¤)
LPDEST="lp1" (-> Default Printer Set )
EDITOR="vi" ( -> Default Editor Set )

export PATH EXINIT ENV LPDEST EDITOR ( Àü¿ªº¯¼ö ¼±¾ð )

$ . ~/.profile ( .profile Àç ÃʱâÈ­)


2) $HOME/.kshrc ¼³Á¤Çϱâ

$ vi ~/.kshrc

HOSTNAME=`uname -n`
PS1='[$LOGNAME@$HOSTNAME:$PWD]$ ' (-> ÇÁ·ÒÇÁÆ® º¯°æ)

export PS1 HOSTNAME (-> Àü¿ªº¯¼ö ¼±¾ð)

## My Alias Def (-> ¿¤¸®¾î½º ¼³Á¤ )
alias ls='ls -F'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias home='cd;ls'
alias c=clear
alias h=history
alias d=date

## Other ksh feature set
set -o noclobber
set -o vi
set -o ignoreeof

$ . ~/.kshrc (-> .kshrc Àç ÃʱâÈ­)


13. ½© ÇÁ·Î±×·¡¹Ö

- ½© ÇÁ·Î±×·¡¹Ö °­ÁÂ

http://kldp.org/KoreanDoc/Shell_Programming-KLDP
http://myhome.naver.com/yskim511/21.htm

4ºÎ. ½Ã½ºÅÛ ¾îµå¹Î

1. UNIX ÆÄÀÏÀÇ Á¾·ù¿Í Ư¼º

- ÆÄÀÏÀº ÆÄÀÏÀ̸§, inode, data blockÀ¸·Î ±¸¼ºµÇ¾î ÀÖ´Ù.
- ÆÄÀÏÀÇ Á¾·ù´Â ls -l , ls -F, file µîÀÇ ¸í·É¾î·Î È®ÀÎÇÒ ¼ö ÀÖ´Ù.

1) ÆÄÀÏÀÇ Á¾·ù
-: Regular File (Ordinary File) : vi, ed, cp, mv, cat, touch, cc µî¿¡ ÀÇÇØ »ý¼º
d: Directory File : mkdir, cp -r µî¿¡ ÀÇÇØ »ý¼º
c,b: Special File ( µð¹ÙÀ̽º ÆÄÀÏ) : ÀåÄ¡ ÆÄÀÏÀ̸ç drvconfig, devfsadmµî¿¡ ÀÇÇØ »ý¼º
brw-r----- 1 root sys 32, 0 2000³â 7¿ù 4ÀÏ /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
crw-r----- 1 root sys 32, 0 2000³â 7¿ù 4ÀÏ /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
l: Symbolic Link File: ½Éº¼¸¯ ¸µÅ© ÆÄÀÏ
lrwxrwxrwx 1 root root 12 2000³â 7¿ù 4ÀÏ /etc/hosts -> ./inet/hosts

$ ln -s file1 file2 (½Éº¼¸¯ ¸µÅ©)
$ ln file2 file3 (ÇÏµå ¸µÅ©)
$ rm file1 (¿øº»À» Á¦°ÅÇÔ)
$ cat file2 file3 ( file2´Â º¼ ¼ö ¾øÀ½)

- ¸µÅ©¶õ ¾î¶² ÆÄÀÏÀÇ ¶Ç ´Ù¸¥ À̸§ÀÌ´Ù.
- Çϵ帵ũ´Â °°Àº inode¸¦ ½Éº¼¸¯ ¸µÅ©´Â ´Ù¸¥ inode¸¦ °®´Â´Ù.
- Çϵ帵ũ´Â µð·ºÅ丮¸¦ ¸µÅ©ÇÒ ¼ö ¾ø´Ù.
- Çϵ帵ũ´Â ¼­·Î ´Ù¸¥ ÆÄÀϽýºÅÛ °£¿¡ ¸µÅ©ÇÒ ¼ö ¾ø´Ù.
- Çϵ帵ũ´Â ¿øº»ÆÄÀÏÀÇ µ¥ÀÌÅÍ¿Í °°Àº µ¥ÀÌÅ͸¦ °øÀ¯Çϸç, ½Éº¼¸¯ ¸µÅ©´Â ¿øº»ÀÇ PATH°ªÀ» µ¥ÀÌÅÍ·Î °®´Â´Ù.

- ½Éº¼¸¯ ¸µÅ©ÀÇ ¿¹
/etc/hosts -> /etc/inet/hosts
/bin -> /usr/sbin
- Çϵ帵ũÀÇ ¿¹
/etc/init.d/* -> /etc/rc#.d/*

2) inode
¸ðµç ÆÄÀÏÀº ÇϳªÀÇ inode¸¦ °¡Áö¸ç ÀÌ°ÍÀº ÇØ´ç ÆÄÀÏ¿¡ ´ëÇÑ Á¤º¸¸¦ °¡Áø´Ù. inode tableÀº inodeµé·Î ±¸¼ºµÇ¾î ÀÖÀ¸¸ç
ÇϳªÀÇ inode´Â ls-lÁ¤º¸, µ¥ÀÌÅͺí·Ï Æ÷ÀÎÅÍ, shadow inode Æ÷ÀÎÅÍ·Î ÀÌ·ç¾îÁ® ÀÖ´Ù. Æ÷ÀÎÅ͵éÀÌ °¡¸®Å³ ¼ö ÀÖ´Â µ¥ÀÌÅÍ ºí·ÏÀÇ
»çÀÌÁî´Â ÃÖ´ë 1T±îÁö °¡´ÉÇÏ´Ù.

- ÆÄÀÏ°ú ÆÄÀϽýºÅÛÀÇ ÃÖ´ë »çÀÌÁî
solaris 2.6 ÀÌÀü : 2G (ÆÄÀÏ), 1TB (ÆÄÀÏ ½Ã½ºÅÛ)
solaris 2.6ºÎÅÍ : 2GÀÌ»ó 1TB (ÆÄÀÏ), 1TB (ÆÄÀÏ ½Ã½ºÅÛ)

ÆÄÀÏÀÇ °æ¿ì ½ÇÀç·Î´Â 866G±îÁö °¡´ÉÇϸç, ÆÄÀÏ ½Ã½ºÅÛÀÇ 1TÀÌ»óÀº Virtual Volume(Meta Device, Veritas Volume Manager)À» ±¸¼ºÇØ¾ß ÇÑ´Ù.


2. Boot PROM (Programmable Read Only Memory)

- PROM °ü·Ã ¹®¼­
Frequently Asked Questions about Sun NVRAM/hostid
http://www.squirrel.com/squirrel/sun-nvram-hostid.faq.html
Sun Flash PROM Guide for Workstations and Workgroup Servers - Standalone Version
http://www.sun.com/products-n-solutions/hardware/docs/pdf/802-3233-23.
pdf
Updating the Flash PROM on the Ultra 1, Ultra 2, Ultra 450, and Sun Enterprise 450 Systems
http://docs.sun.com/db/doc/816-2583-10/6m8u2cukc?a=view
Updating the Flash PROM on the Sun Enterprise 3x00, 4x00, 5x00, and 6x00 Systems
http://docs.sun.com/db/doc/816-2583-10/6m8u2cukk?a=view


1) PROMÀÌ ÇÏ´Â ¿ªÇÒ
- Test the system hardware (POST: Power on Self Test)
- Boot the operating system

[ POST ]
- Initialize the system
- Probes Memory and the CPU
- Probes devices, interprets their devices and build a dev tree
- Install the console

2) PROMÀ¸·Î °¡´Â ¹æ¹ý
- # halt
- # init 0
- # /usr/sbin/shutdown -y -g0 -i0
- Stop + A ( ºÎÆà ½Ã ¹Ù·Î ´©¸£°Å³ª ½Ã½ºÅÛ hang½Ã¿¡¸¸ Àû¿ë)

3) PROM¿¡¼­ÀÇ ¾òÀ» ¼ö ÀÖ´Â Á¤º¸
OK banner ( ½Ã½ºÅÛ ¸ðµ¨¸í, ¸Þ¸ð¸®, hostid, Ethernet Addr, Boot PROM ¹öÀü )
OK probe-scsi ( ¿¬°áµÈ SCSI ÀåÄ¡µéÀÇ Á¤º¸ È®ÀÎ)

4) PROM ¹öÀü
1.x : Original Sparc Boot PROM
2.x : Open Boot PROM (OBP) => sparc ½Ã¸®Áî (sparc4,5,10,20...µî)
3.x : Open Boot PROM with Flash Update (Flash PROM) => ultra sparc ½Ã¸®Áî

5) PROM¿¡¼­ »ç¿ëµÇ´Â ¸í·É¾î
OK help (µµ¿ò¸»)
OK probe-scsi (½ºÄ«½Ã Àåºñ üũ)
OK prebe-ide ( IDEÀåºñ üũ)
OK devalias (PROM¿¡ ¼³Á¤µÇ¾î ÀÖ´Â ÀåºñÀÇ ¹°¸®Àû ÀåÄ¡¸í°ú º°¸í)
OK show-devs ( PROM¿¡ ¼³Á¤µÇ¾î ÀÖ´Â ¹°¸®Àû ÀåÄ¡ÀÇ Æ®¸®±¸Á¶ º¸±â)
OK printenv (PROM¿¡ ¼³Á¤µÇ¾î ÀÖ´Â ºÎÆ® ÆĶó¹ÌÅÍÀÇ ±âº» °ªÀ» È®ÀÎ)
OK setenv <parameter_name> <value>
OK reset ( setenv¿¡ ÀÇÇØ º¯°æµÈ ÆĶó¹ÌÅÍ °ªµéÀ» Àç ÀúÀåÇÏ´Â ¸í·É)
OK set-default <parameter_name> ( ÁöÁ¤ÇÑ ÆĶó¹ÌÅÍ °ªÀ» ÃʱâÈ­)
OK set-defaults ( ÁöÁ¤ÇÑ ¸ðµç ÆĶó¹ÌÅÍ °ªµéÀ» ÃʱâÈ­ => STOP + N)

6) PROMÀÇ ºÎÆ® ¸í·É¾î
OK boot [ device name ] -[option]

OK boot [disk, net, cdrom] (=> default´Â disk)
OK boot -s (½Ì±ÛÀ¯Àú·Î ºÎÆÃ)
OK boot -a (Interactive ¸ðµå·Î ºÎÆÃ)
OK boot -r (Reconfiguration Boot => ÀåÄ¡¸¦ Ãß°¡ÇßÀ» ¶§)

7) OSÀÇ PROM°ü·Ã ½Ã½ºÅÛ ¸í·É¾î
# eeprom (È®ÀÎ)
# eeprom boot-device ( È®ÀÎ)
# eeprom auto-boot?=false (¼³Á¤)
# eeprom 'auto-boot?=false' (cshÀÇ °æ¿ì)


3. ºÎÆ® ÇÁ·Î¼¼½º (Boot Process)

1) ºÎÆÃÀÇ ´Ü°è´Â ´ÙÀ½°ú °°´Ù.

(1) ºÎÆ® PROM ´Ü°è
- PROMÀÌ POST(Power On Self Test)¸¦ ½ÇÇà
- ºÎÆ® µð¹ÙÀ̽º¸¦ °áÁ¤
- ºÎÆ® ÇÁ·Î±×·¥ÀÎ bootblk¸¦ ·Îµå

(2) ºÎÆ® ÇÁ·Î±×·¥ ´Ü°è
- bootblk´Â µÎ ¹ø° ºÎÆ® ÇÁ·Î±×·¥ÀÎ ufsboot¸¦ ·Îµå
- ufsboot´Â Ä¿³ÎÀ» ·Îµå( 32bit, 64bit kernel)

(3) Ä¿³Î ÃʱâÈ­ ´Ü°è
- Ä¿³Î(/kernel/unix, /usr/kernel, /platform/`uname -m`/kernel)Àº ÀÚ½ÅÀ» ÃʱâÈ­ÇÏ°í ¸ðµâÀ» ·Îµå ÇÑ´Ù.
- Configuration ÆÄÀÏÀÎ /etc/systemÀ» Àд´Ù.

(4) init ´Ü°è
- Ä¿³ÎÀÌ /sbin/initÀ» ½ÇÇàÇÑ´Ù.
- initÀº /etc/initabÀ» Àд´Ù.
- ÇÊ¿äÇÑ µ¥¸óÀ» ½ÇÇàÇÑ´Ù.


2) 32 ¶Ç´Â 64 bit Ä¿³ÎÀÇ È®ÀÎ ¹× º¯°æ
64bitÀÇ °æ¿ì OS´Â Solaris7ºÎÅÍ, ½Ã½ºÅÛ ¾ÆÅ°ÅØó´Â sun4u(ultra sparc) À̻󿡼­ÀÌ´Ù.

- È®ÀÎÇϱâ
# isainfo -kv
32-bit sparc kernel modules (=> 32ÀÏ °æ¿ì)
64-bit sparc kernel modules (=> 64ÀÏ °æ¿ì)

- 64bit -> 32bit
OK boot kernel/unix
- 32bit -> 64bit
OK boot kernel/sparcv9/unix

cf. 64bit Ä¿³Î ÁöÁ¤Çϱâ
# vi /platform/sun4u/boot.conf
...
ALLOW_64BIT_KERNEL_ULTRASPARC_1_CPU=true

3) Ä¿³Î ÆĶó¹ÌÅÍ ¼öÁ¤
º¸´Ù ÀÚ¼¼ÇÑ »çÇ×Àº ´ÙÀ½À» ÂüÁ¶ÇÑ´Ù.
- Solaris Tunable Parameters Reference Manual
http://docs.sun.com/db/doc/816-0607

i) ÃÖ´ë »ç¿ëÀÚ¼ö ÁöÁ¤( maxusers)
set maxusers=100

ii) ÃÖ´ë ÇÁ·Î¼¼½º °³¼ö ÁöÁ¤ (max_nprocs)
set max_nprocs=100

iii) °¡»ó ´Ü¸»±â °³¼ö ÁöÁ¤ ( pt_cnt)
- ¸®ºÎÆýÿ¡´Â ¹Ýµå½Ã reconfiguration boot
set pt_cnt=128
set npty=128

iiii) ÃÖ´ë ÆÄÀÏ µð½ºÅ©¸³Æ® °³¼ö ÁöÁ¤Çϱâ (rlim_fd_cur)
- ÇϳªÀÇ ÇÁ·Î¼¼½º°¡ µ¿½Ã¿¡ ¿ÀÇÂÇÒ ¼ö ÀÖ´Â ÃÖ´ë ÆÄÀÏ °³¼ö
- # ulimit descriptors 512
- # ulimit -n 512
set rlim_fd_max=1500
set rlim_fd_cur=128

iiiii) ÃÖ´ë UFS inode¼ö ÁöÁ¤( ufs_ninode)
- ½Ã½ºÅÛ¿¡¼­ ÆÄÀÏÀ» ¿ÀÇ Çϸé ÇϳªÀÇ ÆÄÀÏ¿¡ ´ëÇÏ¿©
ÇϳªÀÇ ufs_ninode¸¦ °¡Áö°Ô µÈ´Ù.
set ufs_ninode=10000

[ How to Setup Kernel Parameter ]

i) backup /etc/system file
# cp /etc/system /etc/system.org

ii) Edit /etc/system file
# vi /etc/system
... (´ÙÀ½À» Ãß°¡)
set pt_max_pty=10

iii) Reconfiguration Boot
# reboot -- -r

iiii) À©µµ¿ì¿¡¼­ Å͹̳ÎÀ» ¿©·¯ °³ ¶ç¿ö max°ªÀ» È®ÀÎ

[ How to recover /etc/system File ]

i) Edit /etc/system file
# vi /etc/system
... (´ÙÀ½À» Ãß°¡)
exclude: drv/dad

ii) reboot
# reboot

iii) Boots the system interactively
OK boot -a
...
Enter filename of kernel (kernel/unix): <Enter>
Enter default directory for modules (kernel, /usr/kernel): <Enter>
Enter name of system file (etc/system): /etc/system.org
Enter default root file system type (ufs): <Enter>
Enter physical name of root device: <Enter>

iiii) Recover /etc/system file
# cp /etc/system.org /etc/system
# init 6


4. init ´Ü°è

kernelÀº initÀ» ½ÇÇàÇÏ°í initÀº /etc/inittabÆÄÀÏÀ» ÀÏ°í ÃʱâÈ­ Çϸç ÇØ´ç ¼³Á¤´ë·Î °ü·Ã ¸í·ÉÀ»
¼öÇàÇÑ´Ù. ½Ã½ºÅÛ ¿î¿µ¿¡ ÇÊ¿äÇÑ µ¥¸ó µéÀ» ½ÇÇàÇÏ°í µ¿ÀÛ·¹º§(Run Level)À» °ü¸®ÇÏ´Â °ÍÀÌ ÁÖ ¿ªÇÒÀÌ´Ù.

1) /etc/inittab ÆÄÀÏ
ap::sysinit:/sbin/autopush -f /etc/iu.ap (*)
ap::sysinit:/sbin/soconfig -f /etc/sock2path (*)
fs::sysinit:/sbin/rcS sysinit >/dev/msglog 2<>/dev/msglog </dev/console (*)
is:3:initdefault: (*)
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog (*)
sS:s:wait:/sbin/rcS >/dev/msglog 2<>/dev/msglog </dev/console (*)
s0:0:wait:/sbin/rc0 >/dev/msglog 2<>/dev/msglog </dev/console
s1:1:respawn:/sbin/rc1 >/dev/msglog 2<>/dev/msglog </dev/console
s2:23:wait:/sbin/rc2 >/dev/msglog 2<>/dev/msglog </dev/console (*)
s3:3:wait:/sbin/rc3 >/dev/msglog 2<>/dev/msglog </dev/console (*)
s5:5:wait:/sbin/rc5 >/dev/msglog 2<>/dev/msglog </dev/console
s6:6:wait:/sbin/rc6 >/dev/msglog 2<>/dev/msglog </dev/console
fw:0:wait:/sbin/uadmin 2 0 >/dev/msglog 2<>/dev/msglog </dev/console
of:5:wait:/sbin/uadmin 2 6 >/dev/msglog 2<>/dev/msglog </dev/console
rb:6:wait:/sbin/uadmin 2 1 >/dev/msglog 2<>/dev/msglog </dev/console
sc:234:respawn:/usr/lib/saf/sac -t 300 (*)
co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " -T sun -d /dev/console -l console -m ldterm,ttcompat (*)

2) Run Level
0 : PROM monitor level. ºÎÆ® PROMÀÇ OK ÇÁ·ÒÇÁÆ® »óÅ·Π½Ã½ºÅÛÀ» Á¾·áÇϱâ À§ÇÑ LevelÀÌ´Ù. (==> halt, init 0, shutdown -i0)
s,S : Single User(°ü¸®ÀÚ) »óÅ·μ­ ¸¶¿îÆ®µÈ ¸ðµç ÆÄÀÏ ½Ã½ºÅÛÀ» Á¢±ÙÇÒ ¼ö ÀÖ´Ù.
1 : Single User(°ü¸®ÀÚ) »óÅ·μ­ »ç¿ë °¡´ÉÇÑ ¸ðµç ÆÄÀÏ ½Ã½ºÅÛÀ» Á¢±ÙÇÒ ¼ö ÀÖ´Ù.
2 : ´ÙÁß »ç¿ëÀÚ ·¹º§ (Multi User Level)
3 : ´ÙÁß »ç¿ëÀÚ ·¹º§ (Multi User Level) with NFS(Network File Service)
4 : User Define Level (»ç¿ëµÇÁö ¾ÊÀ½)
5 : Shutdown(0) and power off (==> poweroff , init 5, shutdown -i5 )
6 : Shutdown(0) and reboot (==> reboot, init 6, shutdown -i6)

3) °¢ Run Levelº° µ¥¸ó ÇÁ·Î¼¼½ºÀÇ ½ÇÇà
init --> /sbin/rc# --> /etc/rc#.d/{S##½ºÅ©¸³Æ®, K##½ºÅ©¸³Æ®} --> µ¥¸ó ½ÇÇà
root(°ü¸®ÀÚ) --> /etc/init.d/½ºÅ©¸³Æ® --> µ¥¸ó Á¾·á, Àç½ÇÇà

/etc/init.d/½ºÅ©¸³Æ® ==> /etc/rc#.d/{S##½ºÅ©¸³Æ®, K##½ºÅ©¸³Æ®}´Â Çϵ帵ũ µÊ. °ü·Ã ÆÄÀÏ °Ë»öÀº ´ÙÀ½°ú °°´Ù.
# ls -i /etc/init.d/nfs.server
28562 /etc/init.d/nfs.server*
# find /etc -inum 28562
/etc/init.d/nfs.server
/etc/rc0.d/K28nfs.server
/etc/rc1.d/K28nfs.server
/etc/rc2.d/K28nfs.server
/etc/rc3.d/s15nfs.server
/etc/rcS.d/K28nfs.server

4) RC ½ºÅ©¸³Æ® Ãß°¡Çϱâ

(1) Edit banner script in /etc/init.d
# cd /etc/init.d
# cp lp banner
# vi banner
#!/bin/sh
#
# Boot Process test script
#

case "$1" in
'start')
[ -f /usr/bin/banner ] && /usr/bin/banner "SYSTEM UP"
/usr/bin/audioplay /usr/demo/SOUND/sounds/rooster.au
;;
'stop')
[ -f /usr/bin/banner ] && /usr/bin/banner "SYSTEM DOWN"
/usr/bin/audioplay /usr/demo/SOUND/sounds/flush.au
;;
'*')
echo "Usage: $0 { start | stop }"
exit 1
esac
exit 0

(2) Test script
# chmod 744 banner
# chown root:sys /etc/init.d/banner
# ./banner start
# ./banner stop

(3) link to /etc/rc2.d
# cd /etc/rc2.d
# ln /etc/init.d/banner S22banner

(4) link to /etc/rcS.d
# cd /etc/rcS.d
# ln /etc/init.d/banner K99banner

(5) link to /etc/rc0.d
# cd /etc/rc0.d
# ln /etc/init.d/banner K99banner

(6) Test init state
# init s
...
# init 6
...
# halt


5. Device Configuration

1) ÀåÄ¡ ¸í
- Logical Device Name ( °ü¸®ÀÚ)
- Physical Device Name ( kernel, system )
- Instance Name (kernelÀÌ ºÎÆà ½Ã ºü¸¥ ÂüÁ¶¸¦ À§ÇØ)

2) Logical Device Name
/dev/[r]dsk/c#t#t#d#s#
c# : Controller Number
t# : Target Number
d# : Disk Number
s# : Slice or partition number (0-7)
¿¹) /dev/dsk/c0t0d0s0(raw device) /dev/rdsk/c0t3d0s (block device)

3) Physical Device Name
# ls -lL /dev/dsk/c0t0d0s0
brw-r----- 1 root sys 32, 0 2000³â 7¿ù 4ÀÏ /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
# ls -lL /dev/rdsk/c0t0d0s0
crw-r----- 1 root sys 32, 0 2000³â 7¿ù 4ÀÏ /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a

4) Instance Name
½Ã½ºÅÛ Ä¿³Î¿¡ ÀÇÇØ ºÎ¿©µÈ Physical Device NameÀÇ Ãà¾àµÈ À̸§ÀÌ´Ù.
# cat /etc/path_to_inst
"/sbus@1f,0" 0 "sbus"
"/sbus@1f,0/SUNW,fas@e,8800000" 0 "fas"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@f,0" 14 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@6,0" 6 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@d,0" 12 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@4,0" 4 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@e,0" 13 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@5,0" 5 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@b,0" 10 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@2,0" 2 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@c,0" 11 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@3,0" 3 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/st@0,0" 0 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@a,0" 9 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/st@1,0" 1 "st"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@6,0" 6 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@4,0" 4 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@5,0" 5 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@2,0" 2 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@3,0" 3 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0" 0 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@1,0" 1 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@8,0" 7 "sd"
"/sbus@1f,0/SUNW,fas@e,8800000/sd@9,0" 8 "sd"
"/sbus@1f,0/sbusmem@2,0" 2 "sbusmem"
"/sbus@1f,0/sbusmem@3,0" 3 "sbusmem"
"/sbus@1f,0/sbusmem@0,0" 0 "sbusmem"
...

5) µð¹ÙÀ̽ºÀÇ À籸¼º

ÀåÄ¡¸¦ »õ·Î ÀåÂøÇÏ°í /devices ¹× /devÀÇ ÀåÄ¡ÆÄÀÏÀ» À籸¼ºÇϱâ À§ÇÑ ¸í·É¾î´Â ´ÙÀ½°ú °°´Ù.
- (Àç)ºÎÆÃÀÌ ÇÊ¿ä
i) # reboot -- -r
ii) OK boot -r
iii) # touch /reconfigure
# reboot ( or init 6)
- (Àç)ºÎÆÃÀÌ ºÒÇÊ¿ä
i) # drvconfig -i sd ( Solaris 2.6ºÎÅÍ )
# disks (tapes, ports, devlinks)
ii) # devfsadm -c disk [ -c tape -c audio ]


6) ÀåÄ¡ Ãß°¡ ¿ë·Ê
- reconfigure file »ý¼º
# touch /reconfigure
- ½Ã½ºÅÛÀÇ Á¤Áö
# init 5
- ½Ã½ºÅÛÀÇ Àü¿øÀ» ²ö´Ù
- ½Ã½ºÅÛ¿¡ »õ·Î¿î µð¹ÙÀ̽º¸¦ ¿¬°áÇÑ´Ù.
- ¿ÜÀåÇüÀÏ °æ¿ì ¿ÜÀå µð¹ÙÀ̽ºÀÇ Àü¿øÀ» ÄÒ´Ù.
- ½Ã½ºÅÛÀÇ Àü¿øÀ» ÄÒ´Ù.
- ºÎÆà ÈÄ Ãß°¡µÈ ÀåÄ¡ÀÇ ReconfigurationÀ» È®ÀÎÇÑ´Ù.

7) ÀåÄ¡ÀÇ ¿¬°áÈ®ÀÎ
- PROM ´Ü°è¿¡¼­
OK probe-scsi
- OS¿¡¼­
# prtconf | grep -v not
# format (µð½ºÅ©ÀÇ °æ¿ì, È®Àθ¸ ÇÏ°í Control + d )
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0
1. c0t1d0 <IBM-DCAS-32160W-S65A cyl 8186 alt 2 hd 3 sec 171>
/sbus@1f,0/SUNW,fas@e,8800000/sd@1,0
Specify disk (enter its number):


6. DISK, SLICE, FORMAT

1) Disk Label (VTOC: Volume Table Of Contents)
- µð½ºÅ©ÀÇ ÆÄƼ¼Ç Å×À̺í (Partition Table)
- µð½ºÅ© µð¹ÙÀ̽º¸¦ ±¸º°ÇÏ´Â º¼·ý¸í(volume name)
- Optional Partition Tag (°¢ ÆÄƼ¼ÇÀÇ Ç¥ÁØ ¸¶¿îÆ® Æ÷ÀÎÆ® À̸§À¸·Î µð½ºÅ© ¶óº§¿¡¼­¸¸ »ç¿ëµÇ°í OS¿¡¼­´Â »ç¿ëµÇÁö ¾Ê´Â Á¦ÇÑµÈ °ª)
- Optional Partition Flag (°¢ ÆÄƼ¼ÇÀÌ WritableÀÌÁö MountableÀÎÁö¸¦ °áÁ¤ÇÏ´Â °ªÀ¸·Î µð½ºÅ© ¶óº§¿¡¼­¸¸ »ç¿ëµÇ°í OS¿¡¼­´Â »ç¿ëµÇÁö
¾Ê´Â Á¦ÇÑµÈ °ª)

VTOCÀÇ Á¤º¸È®ÀÎÀº prtvtoc·Î º¯°æ(ÆÄƼ¼Ç)Àº formatÀ» ÀÌ¿ëÇÑ´Ù

# prtvtoc /dev/rdsk/c0t3d0s2 (=> VTOC Á¤º¸ È®ÀÎ)
# format

2) ÆÄƼ¼Ç Á¤Çϱâ
¼Ö¶ó¸®½º¿¡¼­´Â Çϵåµð½ºÅ©ÀÇ ÆÄƼ¼ÇÀ» Çϱâ À§ÇØ formatÀ̶ó´Â utility¸¦ »ç¿ëÇÑ´Ù.
¼Ö¶ó¸®½º¿¡¼­´Â ÇϳªÀÇ µð½ºÅ©¿¡ ÃÖ´ë 8°³ÀÇ ÆÄƼ¼Ç ±îÁö ³ª´­ ¼ö ÀÖÀ¸¸ç 2¹øÀº Àüü¸¦ ³ªÅ¸³½´Ù. µû¶ó¼­ ½ÇÁ¦ ÆÄƼ¼Ç ¼ö´Â 7°³ÀÌ´Ù.
µð½ºÅ©¸¦ Ãß°¡ÇÏ°í ÆÄƼ¼ÇÀ» Çϱâ À§ÇÑ ÀÚ¼¼ÇÑ »ç¿ë¹ýÀº ´ÙÀ½À» ÂüÁ¶ÇÑ´Ù.
http://www.ussg.iu.edu/usail/peripherals/disks/adding/solaris.html
http://docs.sun.com/db/doc/805-7228/6j6q7uet8

# format (==> Æ÷¸ËÇÏ°íÀÚ ÇÏ´Â µð½ºÅ© ¹øÈ£¸¦ ¼±ÅÃ)
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0
1. c0t1d0 <IBM-DCAS-32160W-S65A cyl 8186 alt 2 hd 3 sec 171>
/sbus@1f,0/SUNW,fas@e,8800000/sd@1,0
Specify disk (enter its number):

ÁÖÀÇ»çÇ× 1) ½½¶óÀ̽º 2¹øÀº µð½ºÅ© Àüü¸¦ ÀǹÌÇϹǷΠÀý´ë ¼öÁ¤ÇÏÁö ¾Ê´Â´Ù.
ÁÖÀÇ»çÇ× 2) ÆÄƼ¼ÇÀº ½Ç¸°´õ ´ÜÀ§·Î ±¸¼ºµÇ´Âµ¥ OffsetÀÌ Á¤È®È÷ ÀÏÄ¡ÇØ¾ß ÇÑ´Ù.
ÁÖÀÇ»çÇ× 3) ·¹À̺í ÀúÀå ¸í·É ( label)À» ¼öÇàÇÏÁö ¾Ê´Â´Ù¸é ¸Þ¸ð¸®¿¡¼­¸¸ º¯°æµÇ¹Ç·Î µð½ºÅ©¿¡´Â ¿µÇâÀ» ÁÖÁö ¾Ê´Â´Ù.

[ ÇÏµå µð½ºÅ© Ãß°¡Çϱâ ]

# init 5
(µð½ºÅ© ¿¬°áÇÏ°í ÆÄ¿ö¸¦ ÄÒ´Ù)
OK probe-scsi
OK boot -r
# prtconf | grep -v not
# format (Ãß°¡µÈ µð½ºÅ©¸¦ ¼±ÅÃÇÏ¿© ÆÄƼ¼Ç ÇÑ´Ù.)
# newfs /dev/rdsk/c0t1d0s6 (°¢ ÆÄƼ¼ÇÀ» ÆÄÀϽýºÅÛÀ¸·Î ¸¸µç´Ù.)
# fsck /dev/rdsk/c0t1d0s6 (ÆÄÀϽýºÅÛÀ» üũÇÑ´Ù.)
# mkdir /data (¸¶¿îÆ®ÇÒ µð·ºÅ丮¸¦ »ý¼ºÇÑ´Ù)
# mount /dev/dsk/c0t1d0s6 /data (¸¶¿îÆ® ÇÑ´Ù)
# df -k ¶Ç´Â mount (¸¶¿îÆ® Á¤º¸¸¦ È®ÀÎÇÑ´Ù.)
# vi /etc/vfstab (ÇØ´ç ÆÄƼ¼ÇÀÇ Á¤º¸¸¦ Ãß°¡ÇÏ¿© ºÎÆà ½Ã ¸¶¿îÆ® µÇµµ·Ï ÇÑ´Ù.)


7. Solaris ÆÄÀÏ ½Ã½ºÅÛ

1) ÆÄÀÏ ½Ã½ºÅÛÀÇ Á¾·ù
- Disk Based File System : ufs(Unix File System), hsfs(High Sierra File System), pcfs(PC File System), udfs(Universal disk Format File System:sol7)
- Distributed File System: nfs ( Network File System)
- Pseudo File System: tmpfs(Temporary File System), swapfs(Swap File System), fdfs(File Descriptor File System), procfs(Process File System)

2) UFSÀÇ ÆÄÀÏ ½Ã½ºÅÛ ±¸Á¶
- label(VTOC)(1 sector)
- Boot Bolck(15 sectors) : bootblk
- SuperBlock(16 sectors)
. ÆÄÀϽýºÅÛ »çÀÌÁî
. ·¹À̺í(ÆÄÀÏ ½Ã½ºÅÛ¸í°ú º¼·ý¸í)
. ÆÄÀÏ ½Ã½ºÅÛÀÇ Logical block ÀÇ »çÀÌÁî
. ¸¶Áö¸·À¸·Î ¾÷µ¥ÀÌÆ®µÈ ³¯Â¥¿Í ½Ã°£
. ½Ç¸°´õ ±×·ìÀÇ »çÀÌÁî
. ½Ç¸°´õ ±×·ì ¾ÈÀÇ µ¥ÀÌÅÍ ºí·ÏÀÇ numberÀÇ fragmentÀÇ »çÀÌÁî
. µ¥ÀÌÅÍ ºí·ÏÀÇ ¿ä¾à Á¤º¸
. ÆÄÀÏ ½Ã½ºÅÛ »óÅ °ª (clean, stable, active, logging or unknown)
. ¸¶Áö¸· ¸¶¿îÆ® Æ÷ÀÎÆ®ÀÇ °æ·Î¸í
- First Cylinder Group (º¸Åë ±×·ì´ç 16°³ÀÇ ½Ç¸°´õ)
|__ backup Super Block
|__ Cylinder Group Block
| . inode ¼ö
| . ½Ç¸°´õ ±×·ì¿¡¼­ÀÇ µ¥ÀÌÅÍ ºí·Ï ¼ö
| . µð·ºÅ͸®ÀÇ ¼ö
| . free blockÀÇ map
| . ½Ç¸°´õ ±×·ì¿¡¼­ free block, free_inode, free fregmentÀÇ ¼ö
| . »ç¿ëµÈ inodeÀÇ map
|__ inode table
|__ Data Block(ÇÑ ºí·Ï´ç 8K bytes, 1K´Â fregment¶ó ÇÔ)
- Second Cylinder Group
....

3) ÆÄÀÏ ½Ã½ºÅÛÀÇ »ý¼º
# newfs /dev/rdsk/c0t0d0s0
newfs: /dev/rdsk/c0t0d0s0 last mounted as /images
newfs: construct a new file system /dev/rdsk/c0t0d0s0: (y/n)? y
/dev/rdsk/c0t0d0s0: 4199508 sectors in 6603 cylinders of 4 tracks, 159 sectors
2050.5MB in 104 cyl groups (64 c/g, 19.88MB/g, 3392 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 40896, 81760, 122624, 162848, 203712, 244576, 285440, 325664, 366528,
407392, 448256, 488480, 529344, 570208, 611072, 651296, 692160, 733024,
773888, 814112, 854976, 895840, 936704, 976928, 1017792, 1058656, 1099520,
1139744, 1180608, 1221472, 1262336, 1302560, 1343424, 1384288, 1425152,
1465376, 1506240, 1547104, 1587968, 1628192, 1669056, 1709920, 1750784,
1791008, 1831872, 1872736, 1913600, 1953824, 1994688, 2035552, 2076416,
2116640, 2157504, 2198368, 2239232, 2279456, 2320320, 2361184, 2402048,
2442272, 2483136, 2524000, 2564864, 2605088, 2645952, 2686816, 2727680,
2767904, 2808768, 2849632, 2890496, 2930720, 2971584, 3012448, 3053312,
3093536, 3134400, 3175264, 3216128, 3256352, 3297216, 3338080, 3378944,
3419168, 3460032, 3500896, 3541760, 3581984, 3622848, 3663712, 3704576,
3744800, 3785664, 3826528, 3867392, 3907616, 3948480, 3989344, 4030208,
4070432, 4111296, 4152160, 4193024,

# newfs -m 1 /dev/rdsk/c0t0d0s0 ( Minfree °ªÀ» Á¶Á¤, default´Â 10%)
# fstyp -v /dev/rdsk/c0t0d0s0 | grep minfree (±âÁ¸ÀÇ minfree°ªÀ» È®ÀÎ)
# tunefs -m 2 /dev/rdsk/c0t0d0s0 ( newfs ÀÌÈÄ ´Ù½Ã ÀçÁ¶Á¤)


8. ÆÄÀÏ ½Ã½ºÅÛ ¸¶¿îÆ® (File System Mount)

ÆÄÀϽýºÅÛÀ» »ç¿ëÇϱâ À§Çؼ­´Â Æ®¸®±¸Á¶ÀÇ ÀÓÀÇ µð·ºÅ丮(Mount Point)¿¡ ¿¬°á½ÃÄÑ¾ß Çϴµ¥, À̸¦ ¸¶¿îÆ®(mount)¶ó Çϸç
¸¶¿îÆ®¸¦ ÇØÁ¦ÇÏ´Â °ÍÀ» ¾ð¸¶¿îÆ®(unmount)¶ó ÇÑ´Ù.
¸¶¿îÆ® Æ÷ÀÎÆ®(mount point)´Â ºó µð·ºÅ͸®·Î ÆÄÀÏ ½Ã½ºÅÛÀ» ¿¬°áÇÒ Æ÷ÀÎÆ®¸¦ ÀǹÌÇÑ´Ù.

1) ¸¶¿îÆ® Á¤º¸
# mount
/ on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/onerror=panic/dev=800000 on ±Ý 4¿ù 25 14:18:36 2003
/usr on /dev/dsk/c0t0d0s5 read/write/setuid/intr/largefiles/onerror=panic/dev=800005 on ±Ý 4¿ù 25 14:18:36 2003
/proc on /proc read/write/setuid/dev=3b00000 on ±Ý 4¿ù 25 14:18:35 2003
/dev/fd on fd read/write/setuid/dev=3bc0000 on ±Ý 4¿ù 25 14:18:37 2003
...

==> /etc/mnttab À» ÂüÁ¶ÇÔ(¸¶¿îÆ®, ¾ð¸¶¿îÆ®½Ã ÀÚµ¿ ¾÷µ¥ÀÌÆ®. No Admin)

2) ¸¶¿îÆ®(Mount)
¸¶¿îÆ®´Â mount ¸í·É¾î¸¦ ÀÌ¿ëÇϰųª, ºÎÆà ½Ã /etc/vfstab ÆÄÀÏ Á¤º¸¸¦ Àаí ÀÚµ¿À¸·Î ¸¶¿îÆ®µÇ´Â µÎ °¡Áö °æ¿ì°¡ ÀÖ´Ù.

- ¼öµ¿ ¸¶¿îÆ®
# mount /dev/dsk/c0t3d0s7 /dir1
# mount -o ro /dev/dsk/c0t3d0s6 /dir2
# mount -o ro,nosuid,nolargefiles /dev/dsk/c0t0d0s5 /dir3
# mount -o ro,bg,soft host1:/usr/local /usr/local

- ÀÚµ¿ ¸¶¿îÆ®
# mkdir /newdir
# mount /dev/dsk/c0t1d0s4 /newdir
# vi /etc/vfstab (¿£Æ®¸®¸¦ Ãß°¡)
# umount /newdir (Å×½ºÆ®)
# mount /newdir (Å×½ºÆ®)

cf. # mount /dir1 (=> /etc/vfstab¿¡ ÀÌ¹Ì µî·ÏµÇ¾î ÀÖ´Â °æ¿ì)
cf. # mountall [-r|-l] (=> /etc/vfstab¿¡ "mount at boot" °ªÀÌ yesÀÎ °Í¸¸)

[ /etc/vfstab ÆÄÀÏ ]
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /var ufs 1 no -
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /usr/local ufs 2 yes -
/dev/dsk/c0t1d0s1 /dev/rdsk/c0t1d0s1 /export/home ufs 2 yes nosuid,rq
swap - /tmp tmpfs - yes -

3) ¾ð¸¶¿îÆ®
# umount /dir1
# umount /dev/dsk/c0t3d0s7

cf. # umountall [-r|-l] (=> /, /usr, /var, /var/run, /proc, /dev/fd, /tmp ´Â Á¦¿Ü)

[ umount µÇÁö ¾ÊÀº °æ¿ì Á¶Ä¡ »çÇ× ]
- ÀڽŠ¶Ç´Â ´Ù¸¥ »ç¿ëÀÚ°¡ ÇØ´ç ÆÄÀϽýºÅÛÀ» »ç¿ëÇÏ°í ÀÖ´Ù¸é, ¸ðµç »ç¿ëÀ» ÁßÁöÇÏ°í ÀÛ¾÷ µð·ºÅ͸®µµ ´Ù¸¥ °÷À¸·Î À̵¿ÇÑ´Ù.
- ƯÁ¤ ÇÁ·Î¼¼½º°¡ ÇØ´ç ÆÄÀϽýºÅÛÀ» »ç¿ëÇÏ´Â °æ¿ì À̸¦ Á¾·áÇÑ´Ù.
# fuser -u /export/home
/export/home: 4006c(root) 6399c(user01)
# fuser -u -k /export/home
/export/home: 4006c(root)Killed 6399c(user01)Killed
¶Ç´Â
# umount -f /export/home ( Solaris 8 ºÎÅÍ)

4) Ç÷ÎÇÇ µð½ºÅ©¿Í CDROM ¸¶¿îÆ®
¼Ö¶ó¸®½º¿¡¼­´Â volume Management¸¦ Á¦°øÇϸç, ½±°Ô »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ÀÚµ¿À¸·Î ¸¶¿îÆ®ÇÏ¿© ¼­ºñ½º ÇÑ´Ù.

[ Volume Management ]
- ¼­ºñ½º µ¥¸ó : /usr/sbin/vold
- ¼­ºñ½º µ¥¸ó Á¦¾î ½ºÅ©¸³Æ® : /etc/init.d/volmgt {stop|start}
- ¼³Á¤ ÆÄÀÏ : /etc/vold.conf, /etc/rmmount.conf ( Ưº°È÷ ¼³Á¤À» ÇÒ ÇÊ¿ä´Â ¾ø´Ù)
- Ç÷ÎÇÇ ¸¶¿îÆ® Æ÷ÀÎÆ® : /floppy/floppy0
- CDROM ¸¶¿îÆ® Æ÷ÀÎÆ® : /cdrom/cdrom0

[ Ç÷ÎÇÇÀÇ ¸¶¿îÆ® ]
Ç÷ÎÇǸ¦ »ðÀÔÇÑ´Ù.
# volcheck
# mount (¸¶¿îÆ® È®ÀÎ)
# cd /floppy/floppy0 (ÇÊ¿äÇÑ ÀÛ¾÷ ¼öÇà)
# cd /
# eject floppy
# mount (¾ð¸¶¿îÆ® È®ÀÎ)

cf. ¼öµ¿¸¶¿îÆ®
# /etc/init.d/volmgt stop
# pkill -9 vold
# mount -F pcfs /dev/diskette /mnt (=> msdos file system)
# mount /dev/diskette /mnt (=> ufs file system)

cf. Ç÷ÎÇÇ Æ÷¸Ë
# fdformat -d /dev/rdiskette (msdos Æ÷¸Ë)
# newfs /dev/rdiskette (ufsÆ÷¸Ë)

[ CDROM ¸¶¿îÆ® ]
CDROMÀ» »ðÀÔÇÑ´Ù.
# mount (¸¶¿îÆ® È®ÀÎ)
# cd /cdrom/cdrom0 (ÇÊ¿äÇÑ ÀÛ¾÷ ¼öÇà)
# cd /
# eject cdrom
# mount (¾ð¸¶¿îÆ® È®ÀÎ)

cf. ¼öµ¿¸¶¿îÆ®
# /etc/init.d/volmgt stop
# pkill -9 vold ( vold°¡ Á¾·áµÇÁö ¾Ê´Â °æ¿ì¿¡¸¸)
# mount -F hsfs -o ro /dev/dsk/c0t2d0s0 /mnt

cf. CDROMÀÌ ºüÁ® ³ª¿ÀÁö ¾Ê°Å³ª ¸¶¿îÆ®, ¾ð¸¶¿îÆ®°¡ µÇÁö ¾Ê´Â °æ¿ì Á¶Ä¡»çÇ×
# ps -ef | grep vold (µ¥¸óÀ» È®ÀÎ)
# /etc/init.d/volmgt stop
# /etc/init.d/volmgt start
... (ÇØ°áÀÌ ¾ÈµÇ¸é)
# pkill -9 vold
# ps -ef | grep vold (vold ÇÁ·Î¼¼½º°¡ È®½ÇÈ÷ Á¾·áÇß´ÂÁö È®ÀÎ)
# /etc/init.d/volmgt start
# ps -ef | grep vold (vold°¡ »õ·Î µ¿ÀÛÇÏ¿´´ÂÁö È®ÀÎ)

[ ISO 9660 ÆÄÀÏ ½Ã½ºÅÛ ¸¶¿îÆ® ]

- ISO ÆÄÀÏ »ý¼ºÇϱâ
# mkisofs -o test.iso /etc/init.d
# ls -l test.iso

- ·çÇÁ ¹é µð¹ÙÀ̽º ¼³Á¤Çϱâ
# lofiadm
Block Device File
# lofiadm -a /usr/local/test.iso
/dev/lofi/1
# lofiadm /dev/lofi/1
/usr/local/test.iso

- ¸¶¿îÆ®
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# ls /mnt
(»ç¿ëÇÑ ÈÄ)
# umount /mnt
# lofiadm
# lofiadm -d /dev/lofi/1

5) ÆÄÀÏ ½Ã½ºÅÛÀ» Á¤ÀÇÇÏ´Â ÆÄÀÏ
mount ¸í·ÉÀ» ¼öÇàÇÒ ¶§ Ưº°È÷ ÆÄÀϽýºÅÛ Å¸ÀÔÀ» ¸í½ÃÇÏÁö ¾È´Â °æ¿ì ·ÎÄÃÆÄÀÏ ½Ã½ºÅÛÀº /etc/vfstab, /etc/default/fs¼øÀ̸ç
¿ø°ÝÆÄÀÏ ½Ã½ºÅÛÀº /etc/vfstab, /etc/dfs/fstypesÀÌ´Ù.

/etc/vfstab
ex) /dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no -
/etc/default/fs
ex) LOCAL=ufs
/etc/dfs/fstypes
ex) nfs NFS Utilities
autofs AUTOFS Utilities
cachefs CACHEFS Utilities


9. ÆÄÀÏ ½Ã½ºÅÛ °ü¸®

½Ã½ºÅÛÀÇ ºÎÀûÀýÇÑ ÁßÁö(Á¤Àü, ºñÁ¤»ó Á¾·á µî..)·Î ÀÎÇØ ÆÄÀÏ ½Ã½ºÅÛÀÌ ¼Õ»óµÉ °æ¿ì fsck À¯Æ¿À» ÀÌ¿ëÇÏ¿© º¹±¸ÇØ ÁÖ¾î¾ß ÇÑ´Ù.
fsck´Â superblock, inode, indirect block, data block À» °Ë»çÇÏ°í Ä¡·áÇÑ´Ù.

- Superblock °Ë»ç
ÆÄÀÏ ½Ã½ºÅÛ »çÀÌÁî, inode number, free block count, free inode count
- inode °Ë»ç
format and type, link count, duplicate block, bad block number, inode size
- Indirect block °Ë»ç
ºí·ÏÀÌ ´Ù¸¥ inode¿¡ ÀÇÇØ ÀÌ¹Ì Á¡À¯µÇ¾î ÀÖ´Â °Í
ºí·ÏÀÇ ¼ö°¡ ÆÄÀÏ ½Ã½ºÅÛÀÇ ¹üÀ§¿¡ ¾î±ß³­ °Í
- data block °Ë»ç
Æò¹üÇÑ data block
½Éº¼¸¯ ¸µÅ© data block
µð·ºÅ丮 data block

1) fsck (file system check ) ¸í·ÉÀÇ ¼öÇà ¼ø¼­
- Phase 1 : Check Blocks and Sized
- Phase 2 : Check Pathnames
- Phase 3 : Check Connectivity
- Phase 4 : Check Reference Counts
- Phase 5 : Check Cyl groups

ÁÖÀÇ»çÇ×) ¸¶¿îÆ® µÇ¾î »ç¿ëÇÏ°í ÀÖ´Â ÆÄÀÏ ½Ã½ºÅÛÀº fsck¸¦ ¾µ ¼ö ¾ø´Ù. ¾ð¸¶¿îÆ®Çϰųª ½Ì±ÛÀ¯Àú ¸ðµå¿¡¼­ ó¸®ÇÑ´Ù.

2) fsck ¸í·É »ç¿ë¹ý
fsck [ -F FSType] [-V] [-m] [special] /dev/rdsk/ÀåÄ¡ ¸í

# umount /export/home
# fsck -V /export/home (½ÇÇàÇÏÁö´Â ¾Ê°í ½ÇÇà ¸í·É¾î¸¦ º¸¿©ÁÜ)
fsck -F ufs /dev/rdsk/c0t0d0s7 ( => /etc/vfstabÀ» ÂüÁ¶ÇÑ´Ù.)
# fsck /dev/rdsk/c0t0d0s6

cf. SuperBlock ÀÌ ¼Õ»óµÇ¾î º¹±¸µÇÁö ¾Ê´Â °æ¿ì
# newfs -N /dev/rdsk/c0t3d0s7 (=> ¹é¾÷ ¼öÆÛºí·° ¹øÈ£¸¦ È®ÀÎ)
/dev/rdsk/c0t3d0s7: 4199508 sectors in 6603 cylinders of 4 tracks, 159 sectors
2050.5MB in 104 cyl groups (64 c/g, 19.88MB/g, 3392 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 40896, 81760, 122624, 162848, 203712, 244576, 285440, 325664, 366528,
407392, 448256, 488480, 529344, 570208, 611072, 651296, 692160, 733024,
773888, 814112, 854976, 895840, 936704, 976928, 1017792, 1058656, 1099520,
1139744, 1180608, 1221472, 1262336, 1302560, 1343424, 1384288, 1425152,
1465376, 1506240, 1547104, 1587968, 1628192, 1669056, 1709920, 1750784,
1791008, 1831872, 1872736, 1913600, 1953824, 1994688, 2035552, 2076416,

# fsck -F ufs -o b=40896 /dev/rdsk/c0t3d0s7 (=> ÆÄÀÏ ½Ã½ºÅÛ Ã¼Å© )

3) µð½ºÅ© »ç¿ë °ü¸®
- df ¸í·É : ¸¶¿îÆ®µÈ °¢ ÆÄÀÏ ½Ã½ºÅÛÀÇ »ç¿ë¿¡ °üÇÑ Á¤º¸¸¦ º¸¿©ÁÖ´Â ¸í·É¾î
# df -k (Kb ´ÜÀ§·Î º¸¿©ÁÜ)
# df -n (ÆÄÀÏ ½Ã½ºÅÛÀÇ À¯ÇüÀ» º¸¿©ÁÜ)
# df -k -F ufs ( ufs ÆÄÀÏ ½Ã½ºÅÛ¸¸ º¸¿©ÁÜ)

- du ¸í·É : ÆÄÀÏ°ú µð·ºÅ͸®¿¡ ´ëÇÑ »ç¿ë Á¤º¸¸¦ º¸¿©ÁÖ´Â ¸í·É¾î
# du -k . (ÇöÀç µð·ºÅ͸® ÀÌÇÏÀÇ »ç¿ë·®)
# du -ks /etc ( /etc ÀüüÀÇ »çÀÌÁî)

- quot ¸í·É : °¢ ÆÄÀϽýºÅÛ¿¡ ´ëÇÑ À¯Àúº°ÀÇ »ç¿ë·®À» º¸¿©ÁÜ
# quot -a ( ¸ðµç ÆÄÀϽýºÅÛÀ» Kb ´ÜÀ§·Î º¸¿©ÁÜ)
# quot -af ( µð½ºÅ© »ç¿ë·®°ú ÇÔ²² ÆÄÀÏ ¼öµµ º¸¿©ÁÜ)

4) quota ¿¡ ´ëÇÑ ¼³Á¤
»ç¿ëÀڵ鿡 Á¦ÇÑµÈ ¿ë·®¸¸ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ¼³Á¤ÇÏ°í °ü¸®ÇÒ ¼ö ÀÖ´Ù.
ÀÚ¼¼ÇÑ ¼³Á¤ ¹æ¹ýÀº ´ÙÀ½À» Âü°íÇÑ´Ù.
http://docs.sun.com/db/doc/805-7229/6j6q8svfc?a=view
http://www.unix.co.kr/data/solaris/?p=sa13
http://www.jic.co.kr/ypct110.htm

5) swapÀÇ Ãß°¡
# swap -l (ÇöÀç ¼³Á¤µÈ ½º¿Ò Á¤º¸¸¦ Ãâ·Â)
# mkdir /files (Ãß°¡ÇÒ swapÆÄÀÏÀÌ À§Ä¡ÇÒ µð·ºÅ丮 »ý¼º)
# mkfile 24m /files/swapfile (½º¿ÒÀ» À§ÇÑ µ¢¾î¸® ÆÄÀÏ »ý¼º)
# swap -a /files/swapfile (½º¿ÒÀ» Ãß°¡, ÁÖÀÇ: Àý´ë°æ·Î·Î ½á¾ß ÇÑ´Ù.)
# swap -l (È®ÀÎ)
# vi /etc/vfstab (ºÎÆà ½Ã ÀÚµ¿À¸·Î ¸¶¿îÆ® µÇµµ·Ï ¼öÁ¤)
/files/swapfile - - swap - no -

# swap -d /files/swapfile ( Á¦°ÅÇÒ °æ¿ì )
# rm /files/swapfile
# vi /etc/vfstab (Ãß°¡µÈ ½º¿Ò ¼³Á¤ ¶óÀÎÀ» Á¦°Å)
# swap -l (È®ÀÎ)

10. ¼Ö¶ó¸®½º ¼³Ä¡ (Solaris Installation)

* ¼Ö¶ó¸®½º 9 ¼Ò°³
http://kr.sun.com/products/software/os_platforms/solaris/index.html
* ¼Ö¶ó¸®½º 8 ¼Ò°³
http://kr.sun.com/products/software/os_platforms/solaris/8/index.html
* Àüü ¹öÀü °£ÀÇ Â÷ÀÌ ºñ±³
http://wwws.sun.com/software/solaris/fcc/fcc.html
* Solaris 9 Installation Guide
http://docs.sun.com/db/doc/806-5205
* Solaris 8 (SPARC Platform Edition) Installation Guide
http://docs.sun.com/db/doc/806-0955
* Solaris for Intel ¼³Ä¡(ÇѱÛ)
http://myhome.naver.com/yasicom/solaris.htm


1) ¼Ö¶ó¸®½º 8 ¼³Ä¡ Àü Áغñ »çÇ×
¼³Ä¡¿¡ ÇÊ¿äÇÑ ÃÖ¼ÒÇÑÀÇ CD (±¹Á¦ÆÇ)
- Solaris 8 Installation CD
- Solaris 8 Software 1/2 CD
- Solaris 8 Software 2/2 CD
- Solaris 8 Language CD

2) Çϵå¿þ¾î ¿ä±¸»çÇ×
- Sparc Base ¶Ç´Â Intel Based ½Ã½ºÅÛ
- 64 MB ¸Þ¸ð¸®
- 2.1 GB µð½ºÅ© ½ºÆäÀ̽º
- CD-ROM µå¶óÀ̺ê

3) Solaris 8 ¼³Ä¡ Àü Á¤º¸ ¼öÁý
- È£½ºÆ® À̸§
- IP ÁÖ¼Ò
- ³×ÀÌ¹Ö ¼­ºñ½º(DNS, NIS, NIS+, ¾øÀ½)ÀÇ À¯Çü ¹× ±¸¼º Á¤º¸
- subnet mask
- root password
- ¼ÒÇÁÆ®¿þ¾î ±×·ì
Entire Distribution(2.1G ±ÇÀå) + OEM, Entire Distribution(1.9G ±ÇÀå), Developer(1.5G ±ÇÀå), End User(1.2G ±ÇÀå), Core(718M ±ÇÀå)
- OS¸¦ ¼³Ä¡ÇÒ µð½ºÅ© ¼³Á¤ ¹× ÆÄƼ¼Ç ¼³Á¤

4) ¼³Ä¡ ¹æ¹ý
- WebStart Installation ( Install CD)
- JumpStart Installation ( from Jumpstart Server System)
- Interactive Installation ( Software 1/2 CD)

5) ¼³Ä¡ ¼ø¼­
CDROM ³Ö°í
# shutdown -i0 -y -g0 ( init 0 ¶Ç´Â Stop + A)
OK set-defaults
OK boot cdrom
- ½Ã½ºÅÛ ½Äº°
- µð½ºÅ© ¼±Åà ¹× ÆÄƼ¼Ç ¼³Á¤
- ¼ÒÇÁÆ®¿þ¾î ±×·ì ¼³Á¤
- ¼³Ä¡ ÈÄ ÀçºÎÆÃ
- Software 2/2 CD, Language CD Â÷·Ê·Î ¼³Ä¡

6) ¼³Ä¡ ½Ã À¯ÀÇ»çÇ×
- 32Bit, 64Bit Kernel ¼±Åà ( OS install ÈÄ È®ÀÎÀº isainfo -kv)
- ¼³Ä¡ ÈÄ ¼ÒÇÁÆ®¿þ¾î ±×·ì À¯ÇüÈ®ÀÎ ( # cat /var/sadm/system/admin/CLUSTER )
SUNWCXall(Entire +OEM), SUNWCall(Entire), SUNWCprog(Developer), SUNWCuser(End User), SUNWCreq(Core)
- ÆÄƼ¼Ç ±ÇÀå»çÇ× ( / 100M, /usr 500M~1G, /var 128MÀÌ»ó, swap ¸Þ¸ð¸®2~3¹è, /opt 400MÀÌ»ó, /export/home ÇÊ¿äÇÑ ¸¸Å­)


11. ÆÐÅ°Áö °ü¸®

1) ÆÐÅ°Áö Á¤º¸
# pkginfo | more (Àüü º¸±â)
# pkginfo | grep SUNWman (ƯÁ¤ ÆÐÅ°Áö ¼³Ä¡¿©ºÎ)
# pkginfo -l SUNWman (ƯÁ¤ ÆÐÅ°ÁöÀÇ ÀÚ¼¼ÇÑ Á¤º¸)
# pkginfo -d /cdrom/solarisxxx/Solaris_8/Product | more (CDROM ³»ÀÇ ÆÐÅ°Áö Á¤º¸)
# pkginfo -d /cdrom/solarisxxx/Solaris_8/Product -l SUNWaudio (CDROM ³»ÀÇ Æ¯Á¤ ÆÐÅ°Áö Á¤º¸)
# pkginfo | wc -l ( ¼³Ä¡µÈ ÃÑ ÆÐÅ°Áö ¼ö)

# grep /usr/bin/audioplay /var/sadm/install/contents (audioplay ÀÇ ÆÐÅ°Áö À̸§ ¾Ë¾Æ³»±â1)
# pkgchk -l -p /usr/bin/audioplay (audioplayÀÇ ÆÐÅ°Áö À̸§ ¾Ë¾Æ³»±â2)

# pkgchk SUNWaudio ( ¼³Ä¡ ¼º°ø ¿©ºÎ È®ÀÎ, ¼º°ø ½Ã ¸Þ½ÃÁö ¾øÀ½)
# pkgchk -v SUNWaudio (ƯÁ¤ ÆÐÅ°Áö¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¼³Ä¡ À§Ä¡)
# pkgchk -p /etc/passwd (ƯÁ¤ ÆÄÀÏ¿¡ ´ëÇÑ Ãʱâ ÆÐÅ°Áö ¼³Ä¡ÈÄÀÇ º¯°æ Á¤º¸)

2) ÆÐÅ°Áö Ãß°¡
# pkgadd -d /cdrom/solxxxx/Solaris_8/Product SUNWaudio
# pkgadd -d /cdrom/solxxxx/Solaris_8/Product -s spool SUNWaudio ( /var/spool/pkg¿¡ ÆÐÅ°Áö ½ºÇ®)
# pkgadd -d /cdrom/solxxxx/Solaris_8/Product -s /export/pkgs SUNWaudio ( /export/pkgs¿¡ ÆÐÅ°Áö ½ºÇ®)
* GUIÀÇ ¾îµå¹Î Åø(admintool)À» ÀÌ¿ëÇÏ¿© ¼³Ä¡ÇÒ ¼öµµ ÀÖ´Ù.(cf. sysadmin(14) °¡´É)

3) ÆÐÅ°Áö Á¦°Å
# pkgrm SUNWaudio
# pkgrm -s spool SUNWaudio (/var/spool/pkg ÀÇ ½ºÇ® ÆÐÅ°Áö Á¦°Å)
# pkgrm -s /export/pkgs SUNWaudio (/export/pkgsÀÇ ½ºÇ® ÆÐÅ°Áö Á¦°Å)
* GUIÀÇ ¾îµå¹Î Åø(admintool)À» ÀÌ¿ëÇÏ¿© Á¦°ÅÇÒ ¼öµµ ÀÖ´Ù.(cf. sysadmin(14) °¡´É)

4) ±âŸ Freeware ÆÐÅ°Áö È°¿ë
http://www.sunfreeware.com ¿¡¼­ ´Ù¾çÇÑ ¹«·á ÆÐÅ°Áö¸¦ Á¦°øÇÑ´Ù.

- ¾÷µ¥ÀÌÆ® ¹× ¼³Ä¡¸¦ À§ÇÑ Æí¸®ÇÑ pkg-get Åøµµ Á¦°øÇÑ´Ù. ÀÚ¼¼ÇÑ Á¤º¸´Â ¾Æ·¡ ÂüÁ¶.
http://www.sunfreeware.com/pkg-get.html
- ÆÐÅ°Áö¸¦ Á÷Á¢ Á¦ÀÛÇÏ°í ½ÍÀ» °æ¿ì¿¡´Â ´ÙÀ½À» ÂüÁ¶ÇÑ´Ù.
http://www.sunfreeware.com/pkgadd.html


12. ÆÐÄ¡ °ü¸®

ÆÐÄ¡¿¡ °üÇÑ ´Ù¾çÇÑ Á¤º¸¿Í ÆÐÄ¡ ÆÄÀÏÀº ¾Æ·¡ »çÀÌÆ®¸¦ ÂüÁ¶ÇÑ´Ù.
http://sunsolve.sun.com
ftp://sunsolve.sun.com/pub/patches

ÆÐÄ¡¸¦ °ü¸®Çϰųª ¼³Ä¡Çϱâ À§Çؼ­´Â ÆÐÄ¡ ¹øÈ£¸¦ ¸ÕÀú ÆľÇÇØ¾ß ÇÏ°í, ÀÌ´Â Solaris#.PatchReport¸¦ ´Ù¿î ¹Þ¾Æ È®ÀÎÇÑ´Ù.
OS¼³Ä¡ ÈÄ ¹Ýµå½Ã Recommended Patch¹× ÃֽŠº¸¾È ÆÐÄ¡¸¦ ÇØ ÁÖ¾î¾ß ÇÑ´Ù. ÆÐÄ¡¹øÈ£´Â ´ÙÀ½°ú °°ÀÌ ±¸¼ºµÇ¾îÀÖ´Ù.
109320-02 (ÆÐÄ¡¹øÈ£-revision number)

1) ÆÐÄ¡ Á¤º¸
# showrev -p (½Ã½ºÅÛ¿¡ ¼³Ä¡µÈ ÆÐÄ¡ Á¤º¸ º¸±â)
# patchadd -p (Solaris 2.6ºÎÅÍ, Shell script)
# showrev -p | grep 109320
# patchadd -p | grep 109320

2) Ãʱ⠼³Ä¡ÇØ¾ß ÇÒ ÆÐÄ¡¿Í Âü°í ¹®¼­
Solaris8.PatchReport : Solaris8ÀÇ ¸ðµç recommended ÆÐÄ¡ Á¤º¸
8_Recommended.zip : Solaris8ÀÇ ¸ðµç recommended ÆÐÄ¡ ÆÄÀϵé
8_Recommended.README : Solaris8ÀÇ ¸ðµç recommended ÆÐÄ¡ ¼³Ä¡ ¹æ¹ý°ú ¼³¸í

3) ÆÐÄ¡ Á¤º¸ ¹× ÀúÀå µð·ºÅ丮
/var/sadm/patch

4) ÆÐÄ¡ ¼³Ä¡
# /usr/bin/unzip 109320-03.zip ( Solaris 7ºÎÅÍ)
# /usr/bin/zcat 104040-01.tar.Z | tar xvf - (Solaris2.6)

# more 109320-03/README (¹Ýµå½Ã °ü·Ã README¸¦ Àо´Ù.)
# patchadd 109320-03 (ÆÐÄ¡¸¦ ¼öÇà)
# showrev -p | grep 109320 (¼³Ä¡ ¿©ºÎ¸¦ È®ÀÎ)

# patchrm 109320-03 (ÆÐÄ¡¸¦ Á¦°Å)
# showrev -p | grep 109320 (Á¦°Å ¿©ºÎ¸¦ È®ÀÎ)

- ÁÖÀÇ»çÇ× : Solaris2.6ÀÌÀüÀº ÆÐÄ¡ µð·ºÅ丮 ³»ÀÇ ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇÑ´Ù.
[¼³Ä¡ ½Ã]
# cd 109320
# ./installpatch .
[Á¦°Å½Ã]
# cd /var/sadm/patch/109320
# ./backoutpatch 109320

5) ÆÐÄ¡ Á¤º¸ÀÇ °ü¸®
http://sunsolve.sun.comÀÇ Patch Portal¿¡´Â ÆÐÄ¡¸¦ ü°èÀûÀÌ°í Æí¸®ÇÏ°Ô ´Ù·ê ¼ö ÀÖ´Â Patch finder, Patch Pro, Patch CheckµîÀ»
Á¦°øÇÑ´Ù.

6) ÆÐÄ¡ ¿¡·¯ ÄÚµå Á¤¸®
0 No error
1 Usage error
2 Attempt to apply a patch that's already been applied
3 Effective UID is not root
4 Attempt to save original files failed
5 pkgadd failed
6 Patch is obsoleted
7 Invalid package directory
8 Attempting to patch a package that is not installed
9 Cannot access /usr/sbin/pkgadd (client problem)
10 Package validation errors
11 Error adding patch to root template
12 Patch script terminated due to signal
13 Symbolic link included in patch
14 NOT USED
15 The prepatch script had a return code other than 0.
16 The postpatch script had a return code other than 0.
17 Mismatch of the -d option between a previous patch install and the current one.
18 Not enough space in the file systems that are targets of the patch.
19 $SOFTINFO/INST_RELEASE file not found
20 A direct instance patch was required but not found
21 The required patches have not been installed on the manager
22 A progressive instance patch was required but not found
23 A restricted patch is already applied to the package
24 An incompatible patch is applied
25 A required patch is not applied
26 The user specified backout data can't be found
27 The relative directory supplied can't be found
28 A pkginfo file is corrupt or missing
29 Bad patch ID format
30 Dryrun failure(s)
31 Path given for -C option is invalid
32 Must be running Solaris 2.6 or greater
33 Bad formatted patch file or patch file not found
34 The appropriate kernel jumbo patch needs to be installed

13. ¹é¾÷

¹é¾÷¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¹®¼­´Â ´ÙÀ½À» ÂüÁ¶ÇÑ´Ù.
http://docs.sun.com/db/doc/805-7228/6j6q7uf0u?a=view

- Full dump : ÆÄƼ¼Ç Àüü¸¦ ¹é¾÷
- Incremental dump: Àüü ¹é¾÷ ÈÄ º¯°æµÈ °Í¸¸ ¹é¾÷
- ¼±ÅÃÀû backup: ƯÁ¤ ÆÄÀÏÀ̳ª µð·ºÅ丮¸¦ ¹é¾÷
- Multivolume Backup : ¿©·¯ ÀÇ ¹Ìµð¾î¸¦ ÀÌ¿ëÇÑ ¹é¾÷

1) ¹é¾÷ µð¹ÙÀ̽º Á¾·ù
1/2-inch reel tape(140MB)
2.5-Gbyte 1/4 inch Cartridge(QIC) tape (2.5GB)
DDS3 4mm cartridge tape (DAT) (12-24GB)
14-Gbyte 8-mm cartridge tape (14GB)
DLT 7000 1/2-inch cartridge tape (35~70GB)

cf. /dev/rmt/xyn
x: ÀåÄ¡ ¹øÈ£ (0,1,2...)
y; ¹Ðµµ (h, m, l, c, u)
n: rewind ¿©ºÎ

2) mt ¸í·É¾î (tapeÀ» Á¦¾îÇϱâ À§ÇØ »ç¿ë)

# mt -f /dev/rmt/0 status (-> backup deviceÀÇ »óŸ¦ Ç¥½Ã )
# mt -f /dev/rmt/0n eom (-> tapeÀÇ ¸Ç ³¡À¸·Î À̵¿ )
# mt -f /dev/rmt/0 rewind (-> tape¸¦ Á¦ÀÏ Ã³À½À¸·Î µÇ°¨´Â´Ù. )
# mt -f /dev/rmt/0n fsf [count] (-> count °³¼ö ¸¸Å­ ÆÄÀÏ µÚ·Î °Ç³Ê ¶è´Ù. )
# mt -f /dev/rmt/0n nfsf [count] ( -> count+1 °³¼ö ¸¸Å­ ÆÄÀÏ µÚ·Î °Ç³Ê ¶è´Ù. )
# mt -f /dev/rmt/0n bsf [count] (-> count °³¼ö ¸¸Å­ ÆÄÀÏ ¾ÕÀ¸·Î °Ç³Ê ¶è´Ù. )
# mt -f /dev/rmt/0n nbsf [count] (-> count+1 °³¼ö ¸¸Å­ ÆÄÀÏ ¾ÕÀ¸·Î °Ç³Ê ¶è´Ù. )
# mt -f /dev/rmt/0 erase (-> tapeÀÇ ¸ðµç ³»¿ëÀ» Áö¿î´Ù. tape³ª device¿¡ µû¶ó ´Ù¸£³ª ½Ã°£ÀÌ ¸¹ÀÌ °É¸°´Ù. )
# mt -f /dev/rmt/0 offline (-> tape°¡ eject µÈ´Ù. )


3) tar, dd ¸í·É¾î

# tar tvf /dev/rmt/0 ( -> tapeÀÇ ³»¿ëÀ» È®ÀÎÇÔ )
# tar xvf /dev/rmt/0 ( -> tape¿¡ÀÖ´Â ³»¿ëÀ» Hard disk·Î ³»¸² )
# tar cvf /dev/rmt/0 /etc/hosts (-> Hard disk¿¡ÀÖ´Â file À̳ª directory¸¦ tape·Î ¹ÞÀ½ )
# tar cvfb - backup_dir | rsh host dd of=/dev/rmt/0 (-> remote host¿¡ÀÖ´Â drive·Î backup ¹Þ±â)
# rsh -n host_name dd if=/dev/rmt/0 |tar xvBfb - restore_dir ( -> remote host¿¡ÀÖ´Â drive·Î backup ³»¸®±â )


4) cpio ¸í·É¾î

* ÇöÀç µð·ºÅ丮ÀÇ ³»¿ëÀ» tape·Î backup
# find . -print | cpio -ovcB > /dev/rmt/0
* tape¿¡¼­ fileÀ» extract
# cpio -ivcB /var/tmp/space < /dev/rmt/0
* ÃÖ±Ù ÀÏÁÖÀÏ ³»¿¡ ¼öÁ¤µÈ fileÀ» tape·Î ¹Þ´Â´Ù
# find . -mtime -7 -print | cpio -ovcB > /dev/rmt/0n
# find . -name 'file*' -print | cpio -ovcB > file.list
# cpio -ivt < file.list


5) ufsdump, ufsrestore ¸í·É¾î

* /export/homeÀÌ /dev/rdsk/c0t0d0s3ÀÌ¶ó °¡Á¤

- dumpÇÒ ÆÄÀÏ ¶Ç´Â ÆÄÀϽýºÅÛ ¿ë·®È®ÀÎ
# df -k /export/home
# ufsdump 0S /export/home [ Mega ==> # / (1024 x 1024) ]

- Full Dump
# umount /export/home
# fsck /export/home
# ufsdump 0uf /dev/rmt/0 /export/home

- Incremental Dump
# umount /export/home
# fsck /export/home
# ufsdump 3uf /dev/rmt/0 /export/home
# cat /etc/dumpdates

- ufsrestore
# mount /export/home
# cd /export/home
# ufsrestore tvf /dev/rmt/0 (³»¿ëÀ» È®ÀÎ)
# ufsrestore rvf /dev/rmt/0 (³»¿ëÀ» ¸ðµÎ º¹±¸)
# ls /export/home ( Check filesystem restore)

# cd /var/tmp
# ufsrestore ivf /dev/rmt/0 (interactive·Î ÀϺθ¸ º¹±¸)

- remove restoresymtable file
# rm /export/home/restoresymtable


14. ·Î±× °üÂû ¹× ¼º´É ÃøÁ¤

1) ·Î±× ºÐ¼®

- /etc/syslog.conf (syslog µ¥¸ó ¼³Á¤ÆÄÀÏ)
- /var/adm/sulog ( => su °ü·Ã ·Î±×)
- /var/adm/messages ( => system Áß¿ä ·Î±× ÆÄÀÏ)
- /var/adm/loginlog (=> ·Î±ä °ü·Ã ·Î±×)
- /var/sadm/* (=> ÆÐÅ°Áö °ü·Ã ·Î±×)

·Î±×´Â ´ÙÀ½ ¹®¼­¸¦ ÂüÁ¶ÇÑ´Ù.
http://www.certcc.or.kr/paper/tr2001/tr2001-05/unix_log_analysis.pdf (À¯´Ð½º ·Î±× ºÐ¼® 1)
http://www.certcc.or.kr/paper/tr2001/tr2001-07/Unix_log_analysis_II.pd
f (À¯´Ð½º ·Î±× ºÐ¼® 2)

2) ½Ã½ºÅÛ ÆÛÆ÷¸Õ½º °ü¸®

- System Administration Guide, Volume 2 >> 33. Managing System Performance Topics
http://docs.sun.com/db/doc/805-7229/6j6q8svgf?a=view
- SUN PERFORMANCE
http://www.sun.com/sun-on-net/performance.html
- Solaris Tunable Parameters Reference Manual
http://docs.sun.com/db/doc/816-0607
- ½ã ½Ã½ºÅÛ ¸Þ¸ð¸® Á¤º¸ (Sun UNIX memconf utility)
http://www.4schmidts.com/memconf.html
- Unix and Windows NT System Tools
http://webperso.easyconnect.fr/sgarnaud/unixtools/index.html



5ºÎ. ³×Æ®¿÷ ¾îµå¹Î

1. Network Setup

1) /etc/hostname.<Interface> ¿¡ È£½ºÆ® À̸§À» ±â·Ï
ex) host1

2) /etc/hosts ÆÄÀÏ¿¡ ip¼³Á¤
ex) 192.168.1.20 host1 loghost

3) /etc/defaultrouter ¿¡ gw ip ¼³Á¤
ex) 203.234.247.254

4) Netmask ¼³Á¤
ex) 203.234.247.0 255.255.255.0

5) /etc/resolv.conf ¿¡ DNS¼­¹ö µî·Ï
ex) domain ns.hananet.net
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

6) /etc/resolv.conf ¿¡ dns ¹®ÀÚ¸¦ Ãß°¡
....
hosts files dns ( ==> dns Ãß°¡)

7) ÀçºÎÆÃ
# reboot

cf. ÀçºÎÆà ¾øÀÌ IP º¯°æ
# ifconfig -a
# ifconfig hme0 down
# ifconfig hme0 203.234.247.30 net mask 255.255.255.0 broadcast + up (=> ¼³Á¤)
# ifconfig hme0 (=> È®ÀÎ)
# route add default 203.234.247.254 1 (=> ±âº» °ÔÀÌÆ®¿þÀÌ ¼³Á¤)

cf. È£½ºÆ® À̸§ º¯°æ
´ÙÀ½ 6°³ ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù.
/etc/hosts
/etc/hostname.<interface>
/etc/nodename
/etc/net/*/hosts (3°³)

cf. Network Interface Name
Lance Ethernet(10M Ethernet) : le
Fast Ethernet 1.0 : be
Fast Ethernet 2.0 ÀÌ»ó : hme
Quad Ethernet : qe
Quad FastEthernet 1.0 : hme
Quad FastEthernet 2.0 ÀÌ»ó : qfe
Gigabit Ethernet : vge
ATM 1.0 : sa
ATM 2.0 ÀÌ»ó : ba
FDDI : nf
Token Ring : tr


2. TCP/IP Network Layer

À̷п¡ °üÇÑ ¹®¼­´Â ´ÙÀ½À» ÂüÁ¶ÇÑ´Ù.
- Introduction to TCP/IP
http://www.yale.edu/pclt/COMM/TCPIP.HTM
- SolarisTM 2.x - Tuning Your TCP/IP Stack and More
http://www.sean.de/Solaris/soltune.html
- TCP/IP ÇÁ·ÎÅäÄÝ
http://jkkang.net/unix/netprg/chap1/net1_2.html
- RFC ¹®¼­
ftp://ftp.isi.edu/in-notes/rfc793.txt

1) ifconfig
# ifconfig -a (¸ðµç Network Interface ¼³Á¤ Á¤º¸ Ãâ·Â)

# ifconfig hme0 down (=> Interface disable)
# ifconfig hme0 up (=> Interface enable)

# ifconfig hme0 unplumb (=> Interface close)
# ifconfig hme0 plumb (=> Interface open)

# ifconfig hme0 203.234.247.30 netmask 255.255.255.0 broadcast + up (=> ¼³Á¤)

2) rlogin, rsh, rcp

¸í·É¾î: rlogin, rsh, rcp
¼³Á¤ÆÄÀÏ(user): /etc/hosts.equiv, $HOME/.rhosts
¼³Á¤ÆÄÀÏ(root): /.rhosts
¼­¹öÈ£½ºÆ®: sun01
Ŭ¶óÀ̾ðÆ®: sun02

- ¼­¹ö ÂÊ °ü¸®ÀÚ°¡ ¼³Á¤
sun01# vi /etc/hosts ( Çã¶ôÇÒ Å¬¶óÀ̾ðÆ® È£½ºÆ® µî·Ï)
sun01# echo "sun02 user01" > /etc/hosts.equiv ( Çã¶ôÇÒ È£½ºÆ® ¹× À¯Àúµî·Ï)
sun01# chmod 600 /etc/hosts.equiv

- Ŭ¶óÀ̾ðÆ® °ü¸®ÀÚ°¡ ¼³Á¤
sun02# vi /etc/hosts ( Á¢±ÙÇÒ ¼­¹ö È£½ºÆ® µî·Ï)

- test (Ŭ¶óÀ̾ðÆ®¿¡¼­)
sun02# su - user01
sun02$ rlogin sun01
sun01$ hostname
sun01$ exit

- ¼­¹ö ÂÊ ÀϹÝÀ¯Àú°¡ Çã¶ôÇÒ ¶§
sun01# rm /etc/hosts.equiv
sun01# su - user01
sun01$ echo "sun02 user01" > $HOME/.rhosts
sun01$ chmod 600 $HOME/.rhosts

- Test (Ŭ¶óÀ̾ðÆ®¿¡¼­)
sun02# su - user01
sun02$ rlogin sun01
sun01$ hostname
sun01$ exit

- ±âŸ r°è¿­ ¸í·É¾î
sun02# su - user01
sun02$ hostname
sun02$ rsh sun01 hostname
sun02$ rcp /etc/profile sun01:a.txt
sun02$ rsh sun01 ls (a.txt°¡ º¹»çµÇ¾ú´ÂÁö È®ÀÎ)

3) ±âŸ ³×Æ®¿÷ ¸í·É¾î
# ping google.co.kr
# ping -s google.co.kr
# rusers (Local Network »ç¿ëÀÚ Á¤º¸, cf who)
# rusers -l hostA ( hostA¿¡ ´ëÇØ ·Î±äÇÑ »ç¿ëÀÚ Á¤º¸)

4) ±âŸ Freeware
nmap(Port Scanning), traceroute(trace rote inform), nslookup(DNS info), dig(DNS info) ...

3. FTP Server

- ÀϹÝÀûÀ¸·Î inetd¿¡ ÀÇÇÑ ÁßÀç ¹æ½Ä°ú standalone¹æ½ÄÀÌ ÀÖ´Ù.
- anonymous ftp¼­ºñ½º¸¦ À§Çؼ­´Â ¸Ç ÆäÀÌÁö³ª ´ÙÀ½ »çÀÌÆ®¸¦ Âü°íÇÑ´Ù.
How to Set up a Secure Anonymous FTP Site
http://secinf.net/unix_security/How_to_Set_up_a_Secure_Anonymous_FTP_S
ite.html
- º¸´Ù ¸¹Àº ¼³Á¤°ú ±â´ÉÀ» Á¦°øÇÏ´Â wu-fptd³ª proftpd·Î ´ëüÇÒ ¼ö ÀÖ´Ù. (ÆÐÅ°Áö´Â www.sunfreeware.com)
WU-FTPD Development Group (http://www.wu-ftpd.org/)
The ProFTPD Project (http://www.proftpd.net/)
vsftpd (http://vsftpd.beasts.org/)

/usr/sbin/inetd (/etc/inetd.conf) ---> /usr/sbin/in.ftpd

4. Telnet Server

- ¿äÁòÀº º¸¾È ¶§¹®¿¡ telnet º¸´Ù´Â Secure Shell(ssh)À» »ç¿ëÇÏ´Â °ÍÀÌ ÀϹÝÀûÀÌ´Ù.


5. NFS (Network File System)

NFS´Â ½ã¿¡¼­ °³¹ßÇÑ ºÐ»ê ȯ°æ ÆÄÀϽýºÅÛÀ¸·Î¼­ ¿ø°ÝÁö¿¡¼­ °øÀ¯ÇÑ ÀϺθ¦ ·ÎÄÿ¡¼­ ½±°Ô ¿¬°áÇؼ­ ¾µ ¼ö ÀÖ´Â °øÀ¯ÆÄÀϽýºÅÛÀÌ´Ù.
ÀÚ¼¼ÇÑ ¹®¼­´Â ´ÙÀ½À» Âü°íÇÑ´Ù.
- NFS FAQ
http://www.ebsinc.com/solaris/network/nfs.html
- Chapter 29 Solaris NFS Environment
http://docs.sun.com/db/doc/806-0916/6ja8539fd?a=view

1) NFSÀÇ ÀåÁ¡
- ¿©·¯ ´ëÀÇ ÄÄÇ»ÅÍ°¡ ¸ðµÎ °°Àº ÀÚ·á¿¡ Á¢±ÙÇÏ¿© °°Àº ÆÄÀÏÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù.
- µ¥ÀÌÅÍÀÇ Áߺ¹À» ÁÙÀÌ°í °ü¸®¸¦ ÃÖ¼ÒÈ­ÇÒ ¼ö ÀÖ´Ù.
- ¼­·Î ´Ù¸¥ ȯ°æÀ» Áö¿øÇÑ´Ù.
- ½Ã½ºÅÛ °ü¸® ¿À¹öÇìµå¸¦ ÁÙÀδÙ.

2) NFS Server
- °ü·Ã ÆÄÀÏ
/etc/dfs/dfstab
/e
_________________



-- Ãâó

http://solaris.mesani.net/viewtopic.php?p=181&%3Bsid=181a97b868063a611
47140ecbec5f5fe


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦