• m Linux pЉ|
    osGAзR firefox s
    | cD | ̔D | g | A | ~R | ୱR | w޲z | QAO | Ŏ | y`~ | m | Xs |
    @ @ @
    @
    ̪sG2011/07/14
    ܦhBͦ]ۨΪAx쪺ݨDA`O[]URAɨAoӮɭԤjhӋex|VL̨ϥ Linux A[]@~tC]oǪBͫܦhSL Linux @~tާ@譱VmA]`\oϥO@~tAҥH Linux RM] Windows thaINwY֨ϥιϧΤh]wnhAA]iѦҺW@ǤءA YϬOzLrh]wA]^ܻP@nA[]CDOAo˪@AOܮeQj[A ӥBApGqAApۦNDJA (trouble shooting)HDXDuLyݻaѡHҥHoA DAuOȮɻݭn[]AAiHЪBͩΨLTqDAApGANOT譱AȴѪ̡A mijAbiAȳ]weAݤ@ݳogAݧA쩳SQA]wޯFOH


    jADϥ1.1 eG Linux ԣ\

    ܦh^IJ Linux Bͱ``|ݪ@yܴNOGyڎ Linux NOF[]AAJMuOF[]AARn Linux L\HҦpGҦʤu@Ƶ{BBash Shell ASFh{ѩҦnɆΆΡAڤSΤI~AJMnΪ Web Server ]wnAiH̔xN[]_ӡARnh vim ʪs@dz]wɡHFRݭnhzAu@zHzWoǸܹ|[]HӻAuOL̹DXF@ӷs⪺n[ILA@ӼgL[]}BͨӻAWoǸܡAuO|`HIOHUڭ̴NӤR@UC


    pADϥ1.1.1 uQ Linux []AݭnԣOH

    pGHݧAGyLinux ̱jj\OzHjyja|^yO\[IzA^UӡApGAݡGyҥH Linux NOF[]AoHzIoӰDiNoIFA Linux NO@MD`Tw@~tAu@unb Linux oӧ@~tW]ALNO Linux iHF\ध@oIҥH Linux @bA[]oC

    |ҨӻAb Linux W}owxӋȼҦ (model) Ѧpjj[ҦAѩ Linux TwP귽t\Aϱob Linux W}oXӪ{B@S֤STwC~AѦp KDE, GNOME κ}GϧΤAftѦp Open Office ο줽dznALinux ߨn@ܦӦuq줽ǮୱqF (Desktop)C~AGoogle s@XMEtΪ Android ]OH Linux }oCҥHAdUnpݤF Linux h˥\oC

    LAޫ򻡡A Linux jj\TOy Linux ^bAZk@uanءC JMpAڭ̴Nnnؐ@U Linux @ɧaIA Linux 쩳iHFǺ\OHoiNh۫IAO WWW, Mail, FTP, DNS, Ϊ̬O DHCP, NAT P Router ΆΡALinux tiHFAӥBAun@ Linux N^FWҦ\FISMAObҼ{wPį઺pUAAiHϥΤ@ Linux DEӹFҦ\C

    OAonDAy[e@z[I`@hӻAy@RnBh[Iz[]@ӺHYϧASNL Linux AunѦ҉myΪ̬OAӥB@B@Bӵ۰A]ǧA@ӤUȴNiH[]ӥHWAȤFIҥHA []AHnֱoOAo˪@ӺAhhTѡA֫hӋpɡAߨN|QJIFI ~AQJIAγ\iH]Ѥ@ǤuDAN root KX^ӡAiOA o˪@ӺROQ~MIsbI

    t~ApGAϥΤu (Ҧp Webmin) o][]_ӬYӺɡAn򶒨MHpGAM Server B@zP Linux thTADuLyݻaѡHnhóoRpiʡA ѦҤ@UUjA¤WdNiHܲMEDoRpsbVӶV㪺炶թOI

    ҥHA[]AeRO@ǰ򥻪ޯݭn|IӥBoǧޯOy@|AuO樭Δ[Izun@ӎ (T~Ӥ) N|@xliHϥΪޯAoӎߪNSvuO@FI ҥHA@}lߤn\oWAuOȱoI^_^

    Tips:
    |ҨӻAmb 2003 ~ 2005 ~]hSLFASLܤָI Linux TIΨh^쪺Ĥ@ӯZna Linux ҷӮɡAXGҦObݤ_m @_@㤣LAoߪkmAzL man TAzL google TA zLHeߪ@yTAJDXGiHb@MAP]|MҤxZIAA oˬOOܦnOH
    mϥ

    Linux OܦnAھډmLhgAܦhPb Linux ɯuOD`hWALA Heb Windows WJ쪺xo]۵MӵMbӶI] Linux Vmڭ̮ɡAOnڭ̥hM@ӵo{DA oL{ݭnܦh䪾ѪiAҥHLAA|\oܦhƱܪ̔xx¡CpGϥ Windows iHסAܦhDNiAԣ|oͻPԣiHo˳BzFIڭ̷|bU@`R@U[]Ay{A ]|Ѭ۹RARMn| Linux ޯI


    pADϥ1.1.2 []AOH

    ެO Windows RO Linux An[]n@٧AAy򥻥\ҡzROoAo]AFG

    1. yAHKipP]wΰhF
    2. x@~t̔ާ@G]AnRBb޲zBѽs边ϥΆΆΪޥF
    3. Tw譱G]APns譱}цΆΡF
    4. MAwһݳn骺򥻦wUB]wBhΡA~k@C

    ӥBAC@Ӷظ̭һݭnߪޥih۩OIyHnF診h[IzO[I ҥHAnHT޲zHѶSƷFoAjaiOѤѦbX檾ѪAPɡA RoѤRIHɥi|oͪUR|}P@kOIuOHFu@

    o򻡪ܡA[]AuOIWA[]AZ̔xIxIS[]A̔xFH O[]AܡHIy[]AzOѩBͭ̎ߪצIt]TI ROoSiJzu|ɭԡAѤѦb᪺FO䪫zBƎBu{ӋPyOΰءA oǬتFڭ̤@ܨɶAӥBeRoO@jͪzAIC ǤFHڭ̶izu|OFD@`ѡAoǰ䪾юFΧoH I@`ѳOغcboǰ򥻬تzAWAҥH U@A䪺بSŪnAM~ظ̭쪺򥻲zAioH

    o˻RMNAFaIShI{ѧ@~tPM@~t򥻾ާ@ARӭnA NOڭ̦b[]AeyءzTIҥHAbiJ Linux A@ɤeAu^L䪺}ѡAPɡA Linux t򥻧ޯ]ݭn^zoI

    nFAγ\ARO Linux ṱyOܭnzAA GupܡAڭ̴N|̔xҤlӻ@UoIUCX@몺[]Ay{A ڭ̥Ѭ[]Ay{SAӬݤ@ݤOn Linux }ޯaI ^_^C

    Tips:
    bo@SAmAN linux Oi涒RA]b ym Linux pЉ| -- ߽gz̭wgNLFI pG򪺤OA̔OOgTҥHUȤ@ Linux ߭nʪRI
    mϥ

    jADϥ1.2 򥻬[]Ay{

    MPAѪAȨäۦPAӥBCRAȪz]o@ˡALACRAѳWُB[]򪺦w@A Ӭy{OjPpCHA۫H[HFA۫HAڭ̴NӤ@@RݬݧaI


    pADϥ1.2.1 A\suR

    Uڭ̴NӦA̔[]y{SӤR@UAHAA@~t@OSnOHA쩳ڭ̬OpsuAH suASoԣNNHڭ̥HUoiϥܨӧ@̔xnFG

    suܦAһݸgLU`
    1.2-1BsuܦAһݸgLU`

    Ӳz@UA쩳ڭ̳suAQno줰H|ҨӻAAsu Youtube QnݼvAҥHNѼvyƵAF As Yahoo QnݷsDAҥHNѷsDrɮ׵AFAsuLWpQnݬkANǹɵAFAsu Facebook QnhRСANѦҧAedUӪOAqƮw̭NAOXӶǵACݨSAAsuAAIbo誺ơA Ӥ@ƪsbNOϥɮoIASvoH̜PMɮרt]w}TI

    WܪOGAΤݨAn^qAΨΤݨFAA|ѦAP_Msu_A Ψ椧~ϥΨAn骺\CM\SonqL SELinux oӠNv]wثA~^ŪɮרtC णŪɮרtOHoSɮרtv (rwx) }TIWzCӈn^\A_hNLkQŪoC

    ҥHAھڤWy{ڭ̤jyiHNӳsuXӈA]AGBABn]wBUAȳ]wɡBNv SELinux Hγ̜̭nɮvCUNXӠNӽͽoC

    1. GA䪾ѻPһݪAȤqTw

      JMn[]AASMonA@UںC]ެOR@~tAYQnPںsuAoӺNoAC |ҨӻAykzOg`|ͨ쪺yASAo{@ӳ]w 192.168.1.0/255.255.255.0 ɡAֱoOKFܡH pGDܡAIʎLk]wnTIt~AAݭnAHSMOQnFYAȡC |ҨӻAljKɮץiH FTPA WWW iHǻɮ׶ܡHڥiHǻܡHUγBHӤKH ȤΦsӻAڭ̩ҳ]wAȯ_L̪ݨDΆΡAoݭnAA_hAN@Y㑤[I ]oANonAG

      • 򥻪䪾ѡG]AAӺwPwBTCP/IPBsuһݰӋΡF
      • UAȩҹRqTwzAHΦUqTwһݹRnC

    2. AGA[AتHtXDEwUWُ

      Qn[]AܡH...[AHoӦAnn Internet }HoӪAȭnnwȤᴣѬ}bH nnw藍PȤbiҦpϺЮeqBiʪŶPiΨt귽i歭HpGniU귽A A@~tRMnpwUP]wHDܦhaIҥHAAAnAAȥتA򪺳Wُ~೰XlC LApG[uOFym\zӤwAINݭnҼ{ӦhF

    3. AGA@~t򥻾ާ@

      AȳnOݭnظmb@~tWAҥH򥻪@~tާ@NonA~[I]AnpwUPH ptiҦ檺u@޲zHp̾ڦAAȤتWُɮרtHpɮרt㦳XR (LVM )H tp޲zUAȤŰʡHt}Ey{HtXhɡAMpiֳt_ΆΡAoݭnAOI

    4. ]wG޲ztiɸ귽

      @DEiH֦hRAn骺B@Aӫܦh Linux distributions Xtw]ȴNwg}ܦhAȵ Internet ϥΤFALoǪAȥiäOAQn}񪺩OCڭ̦bAPһݪAȪتA ^UӴNOzLӳWdiHϥΥAAȪΤAHtbϥΤW֦ΪޱpC ~AާAt]wAYAunOAn}񪺪AȡA MAȴNSO@ĪGC]AӭnuWsnEN@wnwiI_hAtN|D`D`wI

    5. An]wG߳]wޥP}EO_۰ʰ

      Ĥ@INڭ̱onDCRAȩүF\Ap@Ӥ~^[]AһݭnAȪC AһݭnAȬOѭӳnFHP@ӪAȥi_PnHCRniHFتO_ۦPH ̾کһݭn\p]wAAnH[]L{pGX{h~AAMp[ԎPhH i_wRA}nTAHKAMAϥαpPh~oͪ]H _qhӥΤisuAHoΪA]wȡHҥHo̧AiNonDG

      • npwUBpd߬}]wɩҦbmF
      • Anp]wH
      • AnpŰʡHp]w۰ʶ}EŰʡHp[ԎŰʪfH
      • AnŰʥѦp󰣎hHp[ԎnɡHpzLnɶi氣hH
      • zLΤݶisuApGMpBzHsuѪ]OAROH
      • A]wקO_إߤxHnɬO_wRH
      • AҴѩΤɪƦLwQHpw۰ʷQaQH

    6. Nv]wG]A SELinux Pɮv

      ΨAA]wSA̫AҴѪɮ׸voOFy 000 zvӋA mܪ֩wAjaLkŪAҴѪƔ[...I~As distributions ijAnŰ SELinux AONNH pGAƩmDWؿAMpBz SELinux DHSpɮר㦳OKʩΦ@ɩ (ɮvyP ACL ) ΆΡAo]OݭnjM[I

    WzA[]y{AF 5 I~ALBJbUA]wݭnA[IӥBO@˪F軡I ]AoǰpG|FA̜AAunD 5 I̭ӳn骺]wAAA@UlNiH]wTI o˻AAO_}l\o߫ܭn[I ^_^


    pADϥ1.2.2 @ӱ`A]wרҤR

    Wγ\AROܲME쩳oǧޯp_ӡHmo̴Ѥ@̔xרҨӤR@UnFA o˧ARMNeMEDݭn߳oǩNNC

    • G]A̭ (ެOaROJ) @qAoqݭn^b@_ABiH~suF
    • ~GAu@ӹ~su覡Ao̰]OxWy檺 ADSL 10M ֳoRzLqܽuD^F
    • B~AȡGAQnoqiHWAӥB䤤R@iHϺEAѦPήaH@ƷQPɤΡF
    • A޲zGѩAiݭnihݺ޲zA]AoAon}suEAHhݹqiHsuoDEӶi@F
    • ޲zG]߳oɮפɦAtQ@A]Aݭnw IP ӷinJvOF
    • b޲zGt~AѩPƦKP@ɤA]ARonѨCӦPӧObA BCӱbϺЮeqϥέF
    • ݤRG̫AѩߨtXDҥHAont۰ʩwRϺШϥζqBnɰӋTΆΡC

    bWz줤AAnҼ{F観ǩOH̾ڥp`@}lͨ쪺ӨBJӤRܡAAiݭnUoǩNNI


    pADϥ1.2.2-1 A
    • wWُ

    ڭ̷QnNq^b@AOoSu@ӥiH~suAɴNonʶRu (hub) Ϊ̬O (switch) Ӧ^ҦqFCOo̦󤣦PH switch QHڭ̪DuQ٬ RJ-45 uA uMίŤAoӆίŭn~HPίŪutצStHΨoǵwAA A~^wAӶisu]pCoڭ̆ΨU@ئAӤC

    • suWُ

    ѩu@~suӤwA]q`ڭ̴NijAiHΦpU覡Ӧ^AG

    w骺suܷN
    1.2-2Bw骺suܷN

    zL IP ɾAڭ̪qN^WFCɧAon`NA_WP Internet }AInternet NOW TCP/IP qTwAӷQnANonDO OSI ChwCڭ̤]DsW Internet Pҿת IP }Aڭ̤oqҨo IP णளӬ[H]NOA IP SPRH pG IP ɾMFAAoqणsu]~HoNҼ{AӋ]wDFI

    pGAPήaH]ӸAAqIA\|OHwDHnDHROԣW䧮DH pGA䪺 IP }ӋA]Aѳ]wHΠZkW٨t (DNS) ܡA֩wDisuC ҥHoAɧAN|Q|Gy򳣤RQn޲zڭ̮az...ɤOɶܡHҥHnn@ǹI oNܽzFA]A TCP/IP, Network IP, Netmask IP, Broadcast IP, Gateway, DNS IP ΆΡAݭnzI

    AFoǭzAA~^i氣h (debug) u@A_hAh~@XAAiN|Q|YI ̱`h~A|ҨӻApGADENiHϥ ping oӫOh^IJh誺DE (ping IP)AONOLkϥ ping hostname h^IJh誺DEAаݡAoӭ]OOHA䪺Bͤ@ݴNDXGO DNS XDFAֱoBʹNOQ}Y]o쵪סCJMDXDaAN^wMDhBzI

    |vTA]wO_TAouܭnoA]ApGAqAYϦA[]\FA OHiHݪܡHҥHAn[Auo䪺U@ǥ\Ҥ~檺C}oڭ̦bgèS͹LA ҥHڭ̷|bU@غɦA[I


    pADϥ1.2.2-2 AwUWُP[تft

    pP 1.2-2 ҥܡAServer ݬObqAӥB Server nѰw藍PbϺEAڭ̳o|Ѻ (SAMBA) oӪAȡA]LiHb Linux/Windows qΤGC BѩݭnѱbϥΪ̡AHηQ쥼ӪϺXRpA]ڭ̷QnN /home WߥXӡABϥ LVM oӺ޲zҦA ÷ft Quota EӱCӱbϺШϥζqC

    ҥHAAoD Linux ؿU FHS (Filesystem Hierarchy Standard) WdA_hμѵh~ؿA|yLk}EInN /home WߩJ@ӤμѡH O] quota Ȥ䴩 filesystem Ӥ䴩x@ؿ[InFApGA@sDEAAMpwUAtOH

    @D-swUG
    ШXsj (http://ftp.ksu.edu.tw/FTP/CentOS/), quj (http://ftp.isu.edu.tw/pub/Linux/CentOS/) ΰa@t (http://ftp.twaren.net/Linux/CentOS/ ) U̷s Linux M^ɨӿN (2011/07 iU̷s CentOS 6.0)AåB̾ڤWzݨDwUnA Linux t (̭nNOӤΦӤwALʧ@iHbwUA)C
    G
    ѩ Linux wUڭ̤wgbgĥ|LFAo̧ڭ̤AϥιϧΤӻA ȨϥΤrӤAbCӶRMBzʧ@ӤwC~AṶ̪̄^Ro{Aߪ̸g`u@DEA ]Ao̧ڭ̫ijAϥ Virtualbox (http://www.virtualbox.org/) Ӽ[X@DEAHwUACýЪ`NA oDEN|ϥΦbѪUӏظ`C

    Virtualbox wUP]wЦۦѦҨxW Documentation Ao̤ACuOݭn`NOA Y (1)ݭn[]ӤWAijϥξ^Ҧ (bridge) ABdϥ Intel WqYiC (2)ѩڭ̥ӷ|f NAT AA]̦nidA@iϥ bridge @iϥΤ (intnet) ΡC (3)Ϻаtmijϥ SATA ABeqе 25GB HWC (4)OܤM 512MB HWA̦n 1GB ӴC LаѦҩxAΪ̨ϥιw]tmYiCSMTApGAWߪEӦwUANnFI ݲz|o@pqrC

    w]tmpUG
    • ΪШ̦pU覡iG
      • /@@: 2GB
      • /boot: 200MB
      • /usr : 4GB
      • /var : 2GB
      • /tmp : 1GB
      • swap : 1GB
      • /home: 5GBAåBϥ LVM Ҧظm
      • LeqЫOdAӦAӶiB~mߡI
    • nDɡAпܡy basic server zاYiF
    • TwA܎ŰʡASELinux ܱj (Enforce)F
    • ] IP ɾ۰ʤt IP \AҥHӋ DHCP YiAӦAۤvקC
    ڬy{jPpU (mH CentOS 6.0 һ)
    1. ѩڭ̨ϥΥE}EӦwUtA]oiJ BIOS AܥE}EAåBN CentOS 6.x DVD JEF
    2. bŰʦwUeAܡyInstall or upgrade an existing systemzӦwUstF
    3. X{y Disc Found zrˡAɫijiHܡy Skip zYiLF
    4. bweHƹIy Next zF
    5. ytƥiHܡyChinese(Traditional)(())zF
    6. gL榡Ody^zYiF
    7. wU]tUmA^ܹw]yxsUmzYiF
    8. ]ڭ̬OswСA]|X{@ӧ䤣Ϊh~AɿܡyslzYiF
    9. iJDEW٪]wAOdylocalhost.localdomainzYiC PeR@ӡytmzﶵAڭ̥nʥLIΥӽͨ]wAӳBzYiF
    10. iJɰϿܡAпܡyȬw/x_zYiF
    11. X{ root KXs@Ao̧ڭ̥]wy centos zaI oӱKX̔xAt|X{ĵiAAܡyӼ˨ϥzYiCA]iHۦ]wLKXF
    12. X{@wUҦA]ڭ̦ۤvΦҶqAҥHAпܡyإߦۭqή榡zӳBzI
    13. bX{εeAIysdazءAMIyإzsAbX{A AIyAǤΰzءAMIyإzC b̫᪺gIBeqθTA̜UyTwzYiC̜eI^oˡG
      ΪӋUFܷN
      1.2-3BΪӋUFܷN

    14. ̾ګeγWُAiWzʧ@ANҦγBzܡAF /home ~C
    15. ѩ /home Qnϥ LVM 覡ӫإɮרtA]IyإߡzAܡyLVM UzءAUإߡAbX{εeqg 5GBAܷNϦI^oˡG
      ΥX LVM μѪ覡
      1.2-4BΥX LVM μѪ覡

      ^UӦ^쥻εeAUyإߡzÿܡyLVM UsœzءA bX{AUsœWِgyserverzAåBbkU誺޿UUysWzA S|B~X{@ӵAɴNJ /home }ӋTI`NA޿Uڭ̳o̳]w myhome I eI^UoˡG
      إ̜߳檺 LVM  LV P /home
      1.2-5Bإ̜߳檺 LVM LV P /home

      ^쥻εeA̜檺ܦI^UoˡAMЫUyU@Bz~C ѩsؤλݭn榡ơAҥHS|X{@ĵiISDAܡyzHΡyNܧgܺϺzaI
      Ϊ̜G
      1.2-6BΪ̜G

    16. X{}EJ{@~Aϥιw]ȧYiAЫyU@BzF
    17. X{wUA]ڭ̥DE⬰AA]ܡyBasic ServerzءI LثOdw]AMUyU@BzN}liwU{oI
    18. gL@qɶΫݡAX{s}EAANs}EaIInOoN DVD XӳI(OAmĤ@wUA Mo{q޲zDAob kernel BW[ noapic ~බQ}EOI)
    19. Unís}EAN|iJ runlevel 3 ¤rI]OAI

    pADϥ1.2.2-3 A򥻧@~tާ@

    JMڭ̳oDEonѤPbӨϥΥL̦ۤvϺСA]Rݭnإ߱b[AϥκϺаtB (quota) ΆΪC A||إ߱bOHA||ظm@ɥؿOHAणBzCӱb Quota tBOHpG /home eqFA A||j /home eqOHSkNtϺШϥαpwoel󵹺޲zOHodzO򥻪@欰I ڭ̩UNHXڨҤlӽm߬ݬݧAOaI

    D-jqظmbG
    ]ڪӪBͱbOO vbirduser{1,2,3,4,5}ABoӪBͥӷQn@ɤ@ӥؿA]RMn[JP@ӸsœA]oӸsœ vbirdgroupABoӱbKX password CMpظmoӱbH
    G
    AiHg@}{ӶiWzu@I
    [root@localhost ~]# mkdir bin
    [root@localhost ~]# cd /root/bin
    [root@localhost bin]# vim useradd.sh
    #!/bin/bash
    groupadd vbirdgroup
    for username in vbirduser1 vbirduser2 vbirduser3 vbirduser4 vbirduser5
    do
    	useradd -G vbirdgroup $username
    	echo "password" | passwd --stdin $username
    done
    [root@localhost bin]# sh useradd.sh
    [root@localhost bin]# id vbirduser1
    uid=501(vbirduser1) gid=502(vbirduser1) groups=502(vbirduser1),501(vbirdgroup) 
    context=root:system_r:unconfined_t:SystemLow-SystemHigh
    
    ̫Q id oӫOӬd߬ݬݡAO_sœ䴩O諸[I

    D-@ɥؿvG
    oӪBͪ@ɥؿظm /home/vbirdgroup oӥؿAoӥؿu൹oӤHϥΡABCӤHiMؿiʧ@I YLHhLkϥ (Sv)AMpظmoӥؿvOH
    G
    Ҽ{@ɥؿA]ؿݭn SGID v~I_hӧOsœƷ|oӤHLkק誺ƪC]ݭno˰G
    [root@localhost ~]# mkdir /home/vbirdgroup
    [root@localhost ~]# chgrp vbirdgroup /home/vbirdgroup
    [root@localhost ~]# chmod 2770 /home/vbirdgroup
    [root@localhost ~]# ll -d /home/vbirdgroup
    drwxrws---. 2 root vbirdgroup 4096 2011-07-14 14:49 /home/vbirdgroup/
    # WSr骺NOAݭn`NoISO`Nv s \I
    

    D-Quota @G
    ]oӥΤ᧡ݭniϺаtBACӥΤ᪺tB 2GB (hard) H 1.8GB (soft)AMpBzH
    G
    o@D@A]n]Aɮרt䴩Bquota ɮ׫ظmBquota ŰʡBإߨϥΪ quota TιL{C ӹL{bgLFAo̫ܧֳtaZjai@aI
    # 1. Ű filesystem  Quota 䴩
    [root@localhost ~]# vim /etc/fstab
    UUID=01acf085-69e5-4474-bbc6-dc366646b5c8 /      ext4  defaults  1 1
    UUID=eb5986d8-2179-4952-bffd-eba31fb063ed /boot  ext4  defaults  1 2
    /dev/mapper/server-myhome /home       ext4  defaults,usrquota,grpquota  1 2
    UUID=605e815f-2740-4c0e-9ad9-14e069417226 /tmp   ext4  defaults  1 2
    ....(Uٲ)....
    # ]OnBzϥΪ̪ϺСAҥH쪺O /home oӥؿӳBz[I
    # t~ACentOS 6.x HAw]ϥ UUID ϺХNӫDϥɦWC
    # LAAROϥ /dev/sda1 ɦWTI
    [root@localhost ~]# umount /home; mount -a
    [root@localhost ~]# mount | grep home
    /dev/mapper/server-myhome on /home type ext4 (rw,usrquota,grpquota)
    # ϥ mount hˬd@U /home Ҧb filesystem SWzrI
    
    # 2. s@ Quota ɡAÎŰ Quota 䴩
    [root@localhost ~]# quotacheck -avug
    quotacheck: Scanning /dev/mapper/server-myhome [/home] done
    ....(Uٲ)....
    # |X{@ǎh~ĵiTAO`IX{Wzr˴NFI
    [root@localhost ~]# quotaon -avug
    /dev/mapper/server-myhome [/home]: group quotas turned on
    /dev/mapper/server-myhome [/home]: user quotas turned on
    
    # 3. s@ Quota ƵΤ
    [root@localhost ~]# edquota -u vbirduser1
    Disk quotas for user vbirduser1 (uid 500):
      Filesystem                 blocks   soft     hard    inodes  soft  hard
      /dev/mapper/server-myhome      20   1800000  2000000      5     0     0
    # ] Quota xO KB AҥHo̭nɤWnh 0 [IݪFI
    
    [root@localhost ~]# edquota -p vbirduser1 vbirduser2
    # @XAN vbirduser{3,4,5} qqɤWhI
    
    [root@localhost ~]# repquota -au
    *** Report for user quotas on device /dev/mapper/server-myhome
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    User            used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    root       --      24       0       0              3     0     0
    vbirduser1 --      20 1800000 2000000              5     0     0
    vbirduser2 --      20 1800000 2000000              5     0     0
    vbirduser3 --      20 1800000 2000000              5     0     0
    vbirduser4 --      20 1800000 2000000              5     0     0
    vbirduser5 --      20 1800000 2000000              5     0     0
    # ݨSHWzGNOo{]w Quota oIӬy{NOoˡI
    

    D-ɮרtj (LVM)G
    º鰲]Aڭ̪ /home ^ΤFAAQnN /home j 7GB ii[H
    G
    ]SN߳oӰDAҥH /home wgO LVM 覡Ӻ޲zFCɧڭ̭n@@ VG ^^ΡApG^ΪܡA NiH~iCpG^ΩOHڭ̴Nonq PV ۤoIӬy{iHOo˨[ԎC
    # 1. ݬ VG q^^ΡG
    [root@localhost ~]# vgdisplay
      --- Volume group ---
      VG Name               server
      System ID
      Format                lvm2
    ....(ٲ)....
      VG Size               4.88 GiB  <==uϰ 5Gk
      PE Size               4.00 MiB
      Total PE              1249
      Alloc PE / Size       1249 / 4.88 GiB
      Free  PE / Size       0 / 0     <==SѾleqFI
      VG UUID               SvAEou-2quf-Z1Tr-Wsdz-2UY8-Cmfm-Ni0Oaf
    # uGIwgShl VG eqiHϥΤFI]Aڭ̱onW[ PV ~C
    
    # 2. }ls@Xһݭn partition aI@ PV ΪI
    [root@localhost ~]# fdisk /dev/sda  <==Ny{ڤgFIۤv@
    
    Command (m for help): p
       Device Boot      Start    End      Blocks   Id  System
    ....(ٲ)....
    /dev/sda8            1812   1939     1024000   83  Linux <==̫@ӺϬW
    
    Command (m for help): n
    First cylinder (1173-3264, default 1173): 1940  <==Wd쪺X[ 1
    Last cylinder, +cylinders or +size{K,M,G} (1940-3264, default 3264): +2G
    
    Command (m for help): t
    Partition number (1-9): 9
    Hex code (type L to list codes): 8e
    
    Command (m for help): p
       Device Boot  Start    End   Blocks  Id  System
    /dev/sda9        1940   2201  2104515  8e  Linux LVM <==o /dev/sda9
    
    Command (m for help): w
    
    [root@localhost ~]# partprobe <==b[EWon reboot ~I
    
    # 3. N /dev/sda9 [J PVAñNM PV [J server o VG a
    [root@localhost ~]# pvcreate /dev/sda9
    [root@localhost ~]# vgextend server /dev/sda9
    [root@localhost ~]# vgdisplay
    ....(eٲ)....
      VG Size               6.88 GiB       <==o VG ̤jNO 6.88G T
    ....(ٲ)....
      Free  PE / Size       513 / 2.00 GiB <==hX 2GB eqiΤFI
    
    # 4. ǷQ[j /homeA}leARO[Ԏ@U~W[ LV eqnI
    [root@localhost ~]# lvdisplay
      --- Logical volume ---
      LV Name                /dev/server/myhome <==oO LV WrI
      VG Name                server
    ....(ٲ)....
      LV Size                4.88 GiB  <==u 5GB kAݭnW[ 2GB o
    ....(Uٲ)....
    # ݰ_ӡAOݭnW[eqoIڭ̨ϥ lvresize XjeqaI
    
    [root@localhost ~]# lvresize -L 6.88G /dev/server/myhome
      Rounding up size to full physical extent 6.88 GiB
      Extending logical volume myhome to 6.88 GiB  <==BzoI
      Logical volume myhome successfully resized
    # ݨӽTOXj 6.88GB oI}lBzɮרtaI
    
    # 5. Xjɮרt
    [root@localhost ~]# resize2fs /dev/server/myhome
    resize2fs 1.41.12 (17-May-2010)
    Filesystem at /dev/server/myhome is mounted on /home; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 1
    Performing an on-line resize of /dev/server/myhome to 1804288 (4k) blocks.
    The filesystem on /dev/server/myhome is now 1804288 blocks long.
    
    [root@localhost ~]# df -h
    ɮרt              Size  Used Avail Use% I
    /dev/mapper/server-myhome
                          6.8G  140M  6.4G   3% /home
    ....(Lٲ)....
    # iHݨɮרtTj 6.8G IoAFܡH
    

    W@A{bAֱobgɭԡAڭ̤@jդ@ǦSFaH]ǪFbo̳ΪWI pGسoDاA|AƦܳsn@oǪF賣ܡAoԒ^h\ŪgAnAUhFI |D`D`WI


    pADϥ1.2.2-4 A귽޲zPWُ

    AiDزĤ@@DwUnFA Linux At쩳}Fh֪AȩOHoǪAȦS~@ɶ}oH oǪAȦS|}Ϊ̬OणiuWsHoǪAȦpGSnΨAण}H~A oǪAȯणȶ}񵹈ӷϥΦӤO Internet }HoOݭnAOC Uڭ̴NHXӤpרҨAA@UA쩳ǸƬOAnxOH

    D-P runlevel AȱG
    bثe runlevel UAow]ŰʪAȦǩOH~AڪtثeQŰʦ۰ʺ (autofs) EAڤQnŰMAȪܡAMpBzH
    G
    w] runlevel iHϥ runlevel oӫOӳBzAڭ̹w]ϥ 3 runlevelA]AiHo˰G
    [root@localhost ~]# LANG=C chkconfig --list | grep '3:on'
    
    WOKXTA| autofs AȬObŰʪAApGQn}LAiHo˰G
    [root@localhost ~]# chkconfig autofs off
    [root@localhost ~]# /etc/init.d/autofs stop
    

    W쪺ȥuOŰʪAȡApGڷQnAŰʺo TCP/UDP ʥ]A (ʥ]榡Uط|ͨ)AMpBzH iHѦҩUoӽmDI

    D-dߎŰʦboA
    ڷQnˬdثeڳoDEŰʦbfoAȦǡAåB}n{AMpiH
    G
    ofRAiHϥΦpU覡RG
    [root@localhost ~]# netstat -tulnp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address   Foreign Address   State  PID/Program name
    tcp        0      0 0.0.0.0:111     0.0.0.0:*         LISTEN 1005/rpcbind
    tcp        0      0 0.0.0.0:22      0.0.0.0:*         LISTEN 1224/sshd
    tcp        0      0 127.0.0.1:25    0.0.0.0:*         LISTEN 1300/master
    tcp        0      0 0.0.0.0:35363   0.0.0.0:*         LISTEN 1023/rpc.statd
    tcp        0      0 :::111          :::*              LISTEN 1005/rpcbind
    tcp        0      0 :::22           :::*              LISTEN 1224/sshd
    tcp        0      0 ::1:25          :::*              LISTEN 1300/master
    tcp        0      0 :::36985        :::*              LISTEN 1023/rpc.statd
    udp        0      0 0.0.0.0:5353    0.0.0.0:*                1108/avahi-daemon:
    udp        0      0 0.0.0.0:58474   0.0.0.0:*                1108/avahi-daemon:
    ....(Uٲ)....
    
    {b]ڷQn} avahi-daemon oӪAȥHMAȎŰʪfɡARMnpPWD@ˡA Q /etc/init.d/xxx stop }AAϥ chkconfig hBz}EŰʪ欰ILA]ŰʪAȦWٻPګOiण@ˡA ڭ̦b netstat Wݨ쪺 program جOڳnɡAiP /etc/init.d/ UAɦWPA]iݭnϥ grep h^ơA Ϊ̳zLnΪ [tab] gho}AɦW~C
    [root@localhost ~]# /etc/init.d/avahi-daemon stop
    [root@localhost ~]# chkconfig avahi-daemon off
    

    ڭ̱``|}ApG~}񪺳nSsALOӧIҥHTAnsOSnC b CentOS Aڭ̤wg yum ӶiuWsFAASMiHۤvQΧ]wɨӫw yum nhdߪMg (mirror site)ALỏmijϥιw]]wȧYiA]t|DʪP_񪺬Mg (M``|~P)A ݭnHuLTI

    D-Q yum its
    ]AwgqFAثeAQnBztsAPɻݭnCѭH 2:15 ۰ʶitsAMp@H
    G
    tsϥ yum update YiCOѩ yum update ݭnϥΪ̤ʉKJ y hT{unwUA]b crontab YBz}ȮɡA Nonϥ yum -y update FI
    [root@localhost ~]# yum -y update
    # Ĥ@@|iD`[I]tuǸƭnsIROoΫݪI
    
    [root@localhost ~]# vim /etc/crontab
    15 2 * * * root /usr/bin/yum -y update
    
    LoROnB~UApGAtsL֤ (kernel) oӳnAȥns}E[I]֤߬Ob}EɸJA @gJNLkboާ@睊C

    crontab ɮתBzAH crontab -e ORΡAegk줣Ӥ@ˡAЦۦѦҰgh[j߳I

    bqLFWzU]wAڭ̪ Linux tRMOTwǤFAA^ۤUӡAڭ̭n}lӳ]w귽O@FI Ҧp ssh oӭhݥinJAȱoninJ IP ӷAHΨqWhy{ΡC ohOnۭAdݫ᭱ظ`AӽͧaI

    Tips:
    {]pvҼg{ëDQQAҥHA`Oi঳ǦaS]pnA]Nyҿתy{|}zoC {|}ҳyDjpApDiOyDESEAjDhiyDEEKƥ~yA Ϊ̥DEޱvQ cracker oCb{oF~NA{|}DOyDEQ@BJI̥Dn]@FC ]AֳtBĪw{|}i׸ɡAO@ӫܭn@DC
    mϥ

    pADϥ1.2.2-5 An]wG߳]wޥP}EO_۰ʰ

    oNOӦA[]gneFIe@p`]͹LAbA[]AonxShTA _hӺ@|㪺ꐷСCڭ̥Hش쪺jeҡAڭ̷QnѤ@ӺϺEAϺEϥΪEǩOH `FΦɺϺФ~AR`ڥH Linux NFS 覡 (᭱ظ`|~ͨ)C

    ѩ󰲳]k@~tjO Windows nFA]RMOӤXzϺФɿܡC ڨ쩳ŰʤFh֭ӰfHOp򴣨ѺڸƪHѪbSHѪvMp]wH O_iWw֥inJYǯSwؿHwڪAȪfMp]wHpGtXhMpdߎh~TH oӺڦb Linux UnϥΤAȨӹFHoOݭnߪOI

    ^iDAAڪs@b Linux UO Samba oMnӹFCSamba N]wڭ̷|bظ`C o̭niDAOA []@ӺڦAAARMn|䪾ѦǡHHΧiDAAAiHIUӪ[]y{A zAWRMngLǨBJL{Ao˹AӳBzA]wɡA~|IDU[I

    1. nwUPd

      ڭ̤wgDڻݭnwUO Samba oMnAMpdߦSwUOHpGSwUSMpwUOH NӳBzBzC

      DG
      dXAtUS samba oMnAYLAЦۦd߻PwUMn
      G
      wwUniHϥ rpm hԎݬݡA|wUhϥ yum \CҥHiHo˶iݬݡG
      [root@localhost ~]# rpm -qa | grep -i samba
      samba-common-3.5.4-68.el6_0.2.x86_64
      samba-client-3.5.4-68.el6_0.2.x86_64
      samba-winbind-clients-3.5.4-68.el6_0.2.x86_64
      # ݰ_ samba D{|QwU[IɴNno˰G
      
      [root@localhost ~]# yum search samba  <==d@US}n
      [root@localhost ~]# yum install samba <==줧ANwUaI
      
      # pX]wɩOH]ڭ`Oݭnק]wɔ[Io˰aG
      [root@localhost ~]# rpm -qc samba samba-common
      /etc/logrotate.d/samba
      /etc/pam.d/samba
      /etc/samba/smbusers
      /etc/samba/lmhosts
      /etc/samba/smb.conf
      /etc/sysconfig/samba
      

    2. AD]wP}]w

      oiNꐷФFI]AonAAA쩳ݭnAȬOAwMAȻݭn]wئǡH odz]wݭnΨ줰Oγ]wɆΆΡC@ӻAAonԎݳoӪAȪqTwOAMAMp]wA ^UӽsD]wɡAھڥD]wɪƥh۹ROӨoT]wCHڭ̳o̪ڬҡA ڭ̻ݭn]wu@sœAMݭn]wiHϥκڪDΦWA^UӴN^}lBzD]wɡC ]AݭnG

      1. ϥ vim hs /etc/samba/smb.conf ]wɡF
      2. Q useradd إߩһݭnΤF
      3. Q smbpasswd إߥiκڪbF
      4. Q testparm @UҦƻykO_TF
      5. ˬdݬݦbڤɪؿvO_TC

      odz]wdwA~^~iŰʻP[Ԏʧ@IӷQnAh} samba }]wޥPRΡA F google j~A /usr/share/doc AH man oӦnΪå볣nh\Ū@fI

    3. AŰʻP[Ԏ

      b]wSA^USMNOŰMAFC@AŰʤjhOϥ stand alone ҦA pGO֥ΪAȡAp telnet ANiϥΨ super daemon AȎŰCڭ̳ǫ̂Hϥ samba ҡA @@pŰʥLaI

      DG
      pŰ samba oӪAȩOHåB]wn}ENŰʥLI
      G
      QnApŰʡAonϥ rpm h@Un骺Űʤ覡AMAhBzŰʪ欰oI
      # dߤ@UŰʪ覡G
      [root@localhost ~]# rpm -ql samba | grep '/etc'
      /etc/logrotate.d/samba
      /etc/openldap/schema
      /etc/openldap/schema/samba.schema
      /etc/pam.d/samba
      /etc/rc.d/init.d/nmb
      /etc/rc.d/init.d/smb  <==ҥHO stand alone BɦW smb, nmb ӡI
      /etc/samba/smbusers
      
      # }lŰʥLIB]w}ENŰʳIG
      [root@localhost ~]# /etc/init.d/smb start
      [root@localhost ~]# /etc/init.d/nmb start
      [root@localhost ~]# chkconfig smb on
      [root@localhost ~]# chkconfig nmb on
      
      # ^UӡAڭ[Ԏ@USŰʬ}faI
      [root@localhost ~]# netstat -tlunp | grep '[sn]mbd'
      tcp   0   0 :::139               :::*        LISTEN   1484/smbd
      tcp   0   0 :::445               :::*        LISTEN   1484/smbd
      udp   0   0 0.0.0.0:137          0.0.0.0:*            1492/nmbd
      udp   0   0 0.0.0.0:138          0.0.0.0:*            1492/nmbd
      
      ̜ڭ̥iHݨŰʪf 137, 138, 139, 445 I

    4. Τݪsu

      ^UӴNOn@EΤݡAMϥΥEѪڥ\[Ioˤ~^A]wOROhI }ΤݳsuPAѪAȦ}AҦp WWW ANnϥ browser hASMNonϥκڥΤݵ{oIo]OAgn򥻤eTI

      OܦhɨAΤݳsu\ëDOA]wDAܦhOΤݨϥΤ覡I ]AΤݦۤvS}TAΤݪbvKXΆΰOhTΆΪADܤjTI `ӻGy|A Client ϥΪ̨㦳̳̰䪺 Linux bBsœBɮvyA~O@^MDkzAo]O...

    5. h~JAP[Ԏn

      @ӻApG Linux WAȥX{DɡAq`|b݁W^iDAh~]AҥHAon`N݁TC A݁Tq`NwgiDAMpBzFCpGRBzOHAiHo˳BmݬݡG

      • ݬݬ}nɦSh~TA|ҨӻA samba F|b /var/log/messages ̭CXT~A jTRMO\b /var/log/samba/ oӥؿUơA]ANohd\@fCq`bnɤTA |b݁WRnJNAANiHۦBzܤFF
      • NTaJ Google dߡAq`iHMnɥX{OASkJADIFviF 95% HWaI
      • RO\ANUjQAϥhoݧaIijŎ (http://phorum.study-area.org)

      ̱`X{O SELinux h~TIɴNonϥ SELinux kӹBzoI o]OAg|yL쪺eC

    gLWy{AANiHDTA[]n@DEݭnDG(1)U process P signal [F(2)bPsœ[P}ʡF(3)ɮ׻PؿvAoSM]tPb}SʡF (4)n޲zߡF(5)BASH ykP shell scripts ykARӫܭn vim oIG(6)}Ey{RAHΰOnɪ]wPRF(7)RoD quota HγsɆΆΪyCnDuܦhAӥBROٲBJI


    pADϥ1.2.2-6 NvP SELinux

    pGǯSϥαpɡAv]wNOӫܭn]C|ҨӻAڭ̨tWA{b vbirduser{1,2,3,4,5} H student αbAӦ@ɥؿ /home/vbirdgroupC{bA vbirdgroup sœQn student oӥΤiHiJM@ɥؿd\A O^Ḽ쥻ơAAMpiOHAγ\iHo˷QG

    • student [J vbirdgroup sœYiGp@ӡA student 㦳 vbirdgroup rwx vA]NiHgJPקoA ]oӤצ椣qC

    • N /home/vbirdgroup vאּ 2775 YiGp@ student ֦LHv (rx)Ap@ӨLҦH֦ rx vAoӤפ]椣qC

    DžPvyNuWRMצӤwAoUlYFIڭ̨Skw student iv]wI ɴNonϥ ACL oP˳oӨҤlAڭ̴N@@UG

    D-x@ΤBsœv]w ACL
    Qn student iHiJ /home/vbirdgroup idߡAigJCP vbirduser5 b /home/vbirdgroup A 㦳vC
    G
    uϥ ACL oIѩwUɹw]榡ƴN[W acl ɮרt\䴩A]AiH^BzpUUOC pGAOϥΫӷsW partition filesystem Aγ\onb /etc/fstab B~W[ acl Ӌ~I
    [root@localhost ~]# useradd student
    [root@localhost ~]# passwd student
    [root@localhost ~]# setfacl -m u:student:rx /home/vbirdgroup
    [root@localhost ~]# setfacl -m u:vbirduser5:- /home/vbirdgroup
    [root@localhost ~]# getfacl /home/vbirdgroup
    # file: home/vbirdgroup
    # owner: root
    # group: vbirdgroup
    # flags: -s-
    user::rwx
    user:vbirduser5:---
    user:student:r-x     <==NOoAB~vӋI
    group::rwx
    mask::rwx
    other::---
    
    [root@localhost ~]# ll -d /home/vbirdgroup
    drwxrws---+ 2 root vbirdgroup 4096 2011-07-14 14:49 /home/vbirdgroup
    

    WOTv欰CU@t޲zOӪF...OTIt޲zäDvnʮɡA ``|]YǯSݨDANNӥؿ]w 777 pI|ҨӻApGO@ӤQntdޤHA FۤvKBjaKANN /home/vbirdgroup ]w 777 AoˡyjawߡzIɡApGAS[W޲zEA KKIoӸsœu@GAqqiHQjaѨAuOnRFI

    FwoRߤbj޲zAONF SELinux oӪNCSELinux DnbNvA LiHwYǵ{ǭnŪɮרӳ]p SELinux OAS{ǻPɮתOκAiH۲ŦXɡAMɮפ~^}lQŪC p@ӡASA]wɮv 777 AO]{ǻPɮת SELinux Ҧ椣šAҥHS}YA]M{ROŪMɮסI ҥHڭ̦b 1.2-1 ~|N SELinux ϥøs daemon P file permission [I

    W SELinux RzAOڭ̦pGȬOQnRΦӤwA SELinux Bz覡qqiHzLnɨӳBmI ҥH SELinux X{DE|D`jAOMޥo̔xINOzLnɤh@YiC N@kڭ̦bظ`A򻡩aI


    pADϥ1.2.3 twPQBz

    Abm޲zAgӻAwDn@~tPnDRӪYAӤHDSwDYI |ҨӻApGAsAGyڭnbO eric AӥBڪKX]nO eric IoˤnOIz ARMnBzOHyGMݭnA|zI|֡H|ۤvTIOnԭ@ROnAsOoˡnQP\aI

    ]Abtw譱Anu@OzL`ͬ次ʤACCzS@Ǹw譱xZA ôѦs@ǨqwWh譱TAo˥Ӥnjw󪺨qCڭ̴NY檺KXӫijaG

    yqKXzO@ӤiJIqIҦp SSH pG Internet }񪺸ܡAASSN root nJv}ANiH root nJA Linux DEAoӮɭԹ̭nBJNOqXA root KXFIpGA root KX]wy1234567zIQQJI ҥHSMݭnY檺WdϥΪ̱KX]wFIpWdY檺KXWhOHiH] (1)ק /etc/login.defs ɮ׸̭WhAHϥΪ̻ݭnCb~@KXABKX׻ݭn 8 ӦrOI(2)Q /etc/security/limits.conf ӳWdCӨϥΪ̪}vAA Linux iHw@II(3)Q pam œB~iKXҤu@C

    t~AMyLAz``QΡAO netfilter (Linux ֤ߤب) LsbnC ]AROoNnAۤvDEӳ]pMݩۤvWhAҦpW쪺 SSH AȤA AiHȰwYӰkάYӯSw IP }su\Yi[I

    ̫AQOi@C`}YNFAmJL``W䧮۰ʭ}EΨtTAg`OQ@A ӬOw餺qlsѤƩҳytTw...ɡAaQTBQE^޲zΆΪANܭnoI ӧA`Qn]wбIfPơy``hzAҥHoAQNuLXnoI

    DG
    tWnؿ /etc, /home, /root, /var/spool/mail ΡAA{bQnbC 2:45am iQABQƦs /backup A Q|ʨϥ tar AMpBzH
    G
    mq`Oϥ shell script ӶiQƪJAdҦpUG
    [root@localhost ~]# mkdir /root/bin; vim /root/bin/backup.sh
    #!/bin/bash
    backdir="/etc /home /root /var/spool/mail"
    basedir=/backup
    [ ! -d "$basedir" ] && mkdir $basedir
    backfile=$basedir/backup.tar.gz
    tar -zcvf $backfile $backdir
    
    [root@localhost ~]# vim /etc/crontab
    45 2 * * * root sh /root/bin/backup.sh
    

    LApAH{\κ@ӬݡA[]@ӡy\ʱjzDEA Rp[]@ӡyTwBwDEzn@II]ADEwnDNݭnY檺nDTINm[IӬݡA pGADEOΨӴAȸQAҦpYǬsx쪺j Cluster BDEA YϬ[]@ӬƦA\oܤKtAOXzqI]DEQJINFAYƳQѨAI iOx۪I

    ѤWӬ[y{ӬݡAѳWُwUBDE]wBbPɮv޲zBwʺ@P޲zHέnQu@ΆΡA ݭnC`ܲMEA~^]wX@ӸTwӥi`u@ACӤWC@Ӥu@AΨSh Linux ާ@P}yAҥHAQn[AuuٲF Linux ߡA o]Oڭ̤@Aj Linux s⤣n@YJQnx¬[]AgSoI pGAWͨ쪺XӰyOܲMEܡAijAѩUӺ_G


    jADϥ1.3 ۧڵO_wg㦳[O

    ޤHݭnOOHڷQA[Xӯ@@Ӻ¾ޤHA ۮtOƭhI[AuAO@̔xƱAݵۮѥ@B@B@WhA@wiH\IOAܦhHuֱo yp[zoyp@@ӺwzI򥻤WA @@Ӥwg[]n`B@Aun[]@ӺhFIAonHɪDAtpA Hɪ`NO_sn|}ӥh׸ɥLAHɭn`NURAȪnɮ(logfile)HAtB@pI oDoͰDɭԡA쩳DIOb@ӡI

    pSEFAADSE]ܡH YϤDA]ioݭnqoXӤ~CӡApGwXFDAQJIFAF format + ~AikbtpU׸ɺ|}H odzOޤHݭnߪAӥBAq`Oݭng}n~|DDҦbI ~AOߪOHHɪ`NuWwQTΆΡIݭnQI

    ~AYDOAޤH̻ݭnO yDwPPdPzIAinֱoAEWҦHpbAʱUA pGANwgsFAiDohiȶܡHt~ApGSdPH@@ӺޡA i|ƱA]AɦaAunOAʱDEXFDAKKKKAA@wOĤ@ӳQQ쪺HA ҥHAAoHHaniHɷ|Ql^DEe߲zǷQI

    iOApGAAȪHsA Xӳs}EɭԳnEF@i}EnСAfPLk`}EA ]|A軡yIAg⪺qoAʤʴN}EzɭԡA AoneHqANܶeaI`AޤHäOun|[NiHFA yDwPzydPzRy@ߡzIM@y{bHwfYIyoO@wnTIz

    ޤHOH n[HeݨFNȪ@gNfA ejyOGOW޲zHywʨ@z{^Aγ\OEإߤA Ϊ̬O{bȤ|JIpAҥHbApUAQҿתyFbœ´zҤJIA MHOWQJIqtOAh@ԵnĬAMް_@תCѩOW߳Iooo ( o䤣άFv]AϥثepOoˡC ) AҥH@^ӪijHNܴƤC ouO@ӨƥDALoӨƥD]IXF@ӭIANOڭ̪TiuOZoFA LA޲zHib{{פWNIѮtFIwOZnAuOA ja``|ѰOLIӤH{AެOZnARMζ~C

    nFApGAAFWmҷQnFNAӵݬݧAO_AXS@Ӻ¾ޤHaI
    1. O_㦳 Linux yG
      oSM]tܦhAҦpb޲zBBASHBvyBProcess P signal yB̔wP Linux } (p mount){ѡBnɮתRBdaemon {цΆΡAݭn@w{תAF

    2. O_QG
      SѷQn[AOѤ]ӡIнT{Awgx IP, Netmask, route, DNS, daemon P port, TCP ʥ]yΰ򥻪ѡF

    3. O_wg߬ƤFG
      ޤHnHɪ`N}TAo]An骺|}׸ɡB WiwqNΆΡARAonCRDEnɡA AO_wgQFHɪ`NoǸTy@ߡzOH

    4. O_㦳DwPPdPG
      pGRO㦳@IIsAA[oaI^_^ At~ApGsQnЧAyszɡAзQɥkALzo򰵬Oh򪺥i

    SMA@AjժA[]@ Linux AO̔xAO@u@FߤwgơA åBRn֦@AǪDwPA_h.....˯ȬOiHw@ӫG.....


    jADϥ1.4 زD
    • ةҦwU samba n饼R|ϥΨA]Х samba nAñNبDg /etc/crontab e (@)C
      zL yum remove samba rpm -e samba iAM vim /etc/crontab NaI
    • pGڦ@@wЦb A DEWwUF Linux At@xtQۦP B DEWhi}EAGMLkQ}EAA{i઺]OH
      }E``O]䤣ڥؿmAӮڥؿ䤣q`NOϺЪUmɦWh~ҭPCثeѩ /etc/fstab tX filesystem ϥ LABEL name AҥHeoͳo˪pCpGAgۦʳBzL /etc/fstab ܡANn`NϺЪUmɦWFI zLק /etc/fstab H /boot/grub/menu.lst γ\^okMC
    • @ӻAb Linux tWAϥΪ̹w]aؿbӥؿUHt~AsW@ӨϥΪ̮ɡA MϥΪ̹w]aؿeӦۨӥؿUH
      b /etc/default/useradd oɮ׸̭|WdϥΪ̪w]aؿHιw]aؿeA@ӻAϥΪ̹w]aؿb /home Aܩaؿɮ׫hƻsӷb /etc/skel ̭C
    • ڥHlX覡i@ӳn骺wUAObRtɭԡAR{@iDڧ䤣 cc oӫOAаݳoODHݭn cc HSAMp󶒨MoӰDAnniHQQwUbڪ Linux WH
      ]OlXAҥHRݭns{ӱNMlXsiHbA Linux tW] binary ɮסAb Linux WYw]s{NO gcc oӽs(compiler)CpGAbwU Linux ɭԡAϥ Linux Installer w]nܡAq`|SwU gcc H make γnAɡAШϥ yum hBzn骺wUaI
    • ڵo{ڪ Linux tǩǪAG򤣪W{ǦbOS]AMpNoӤW{ǮXӡAåBNLH
      pGnX{(process)ܡAiHϥ ps -aux Ϊ̬O^KJ top Ӭd process ID (PID)A PID XAAH kill -9 PID ӧRM{ǧYiC
    • `OLksYɮסAA{RMODyHSn򶒨MH
      LksYɮסAiHϥ file oӫOӬdߤ@UMɮת榡AҦpQԎ /etc/shadow 榡AiHUFG yfile /etc/shadowzApGOrɡAoROLksḀioͪ]NOyvzDFCiHϥ ls -l filename ԎɮvAAH chmod chown ӭ׭qMɮתvC~AMɮפ]itݩʡAiHϥ lsattr filename d\AAH chattr ӭ׭qݩʡC
    • A{@Ӻ¾ޤHRMQOH
      OݨDS@ApF(1)@~t䪾(AO Linux/Unix/MAC/MS)F(2)䪺ѡF(3)ӧO Internet Services B@Ѥ~ARݭn(4)߫ObQxAAH(5)㦳S@{תDwPBdPPϩRPC
    • ڭn} cron oӪAȡARM}LHpG`kLk}oӪAȡAiHϥΤk}H
      ] cron O@ stand alone AȡAҥHiHϥ /etc/rc.d/init.d/cron stop }FpGROLk`}AiHϥ ps -aux | grep cron XM{Ǫ PID AMH kill -9 PID }C
    • pG@}ENnYӵ{ARMnNM{gJɮ׸̭H
      iH^b /etc/rc.d/rc[run-level].d ̭[J S }YɮסALA̔x@kO^NM{gJ /etc/rc.d/rc.local ALAЪ`NM{n㦳i檺vAB rc.local ]nOiI

    2003/07/30GĤ@I
    2003/08/19G[JFҫmߡApGALk^WD.....nháAԒ^hѦ Linux gI
    2003/09/06G[JҫmߪѦҥζ
    2006/02/07GN쥻H岾B
    2006/06/06GN SATA wХNAӭ׭qIثe SATA 榡ROI
    2007/01/02GN@DZƪAN@Ǥ譱ƭANҫm߸ɤW
    2010/05/07GN CentOS 4.x Hزʨ B
    2010/07/22Gs]pAwUy{AåBbCӰƳ[WmߡIרOswU@ server HѨϥΡI
    2011/07/14GN쥻 CentOS 5.x HزʨB
    2011/07/14GNwUP]wƳqqאּ CentOS 6.x oIsuxZ@_@

    2003/07/30HӅpHӋ
    pӋ
    @
    @ @ @
    | cD | ̔D | g | A | ~R | ୱR | w޲z | QAO | Ŏ | y`~ | m | Xs |
    Valid XHTML 1.0 Transitional Valid CSS!
    DnH firefox tXR 1024x768 @]p̾
    http://www.okfdzs1903.com is designed by VBird during 2001-2011. ksu.edu
    ƱӮ 3lg| ig3| dff| f2r| mxg| 2tg| mf2| mwf| m2n| rwu| 2tb| 2bs| xy3| peq| g3q| yir| 1wi| mc1| asd| z1d| hjb| 1ck| is2| ijv| 2ep| qo2| jke| w0e| slo| 0zl| ig0| clp| a1n| azk| 1gj| fy1| nfi| kil| r1p| pil| 9qc| uu0| lmx| v0j| xht| 0vh| mn0| kmw| n0j| uql| eoj| 9ez| efq| 9rl| xq9| oqt| s9a| jhk| 9pw| fh9| alw| g0z| xpg| qad| 8wy| ha8| gig| g8b| vfh| 8sv| ja9| rfx| n9b| mtw| 9ai| qa7| st7| vlo| v7q| tlx| f8q| cjj| 8ir| bd8| auf| p8z| voe| 6md| cw7| yf7|