Click here to load reader

LPI 101 Practice 03

  • View
    216

  • Download
    0

Embed Size (px)

Text of LPI 101 Practice 03

  • 8/9/2019 LPI 101 Practice 03

    1/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    PRACTICE 2

  • 8/9/2019 LPI 101 Practice 03

    2/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    Objectives

    Managing Disk Storage

    Checkinstall tool

    Network File Sy stem ( NFS)

  • 8/9/2019 LPI 101 Practice 03

    3/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    Managing Disk Storage

    Pa rted tool#p a rted / dev /h d aGNU Pa rted 1.6.19Cop y rig h t (C) 1998 - 2004 F ree S oftw a re Found a tion, Inc .Th is progr a m is free softw a re, covered b y t h e GNU Gener a l Public License .Th is progr a m is distributed in th e h ope tha t it will be useful, but WITH OUT ANY WARRA NTY; wit h out even t h e implied

    wa rr a nt y of MERCHA NTABILIT Y or FIT NESS F OR A PARTIC ULAR P URP OSE. S ee th e GNU Gener a l Public License for more det a ils .Using / dev /h d a( p a rted ) print

    Disk geometr y for / dev /h d a: 0.000-38166.679 meg a b y tesDisk la bel t ype : msdosMinor S t a rt End Ty pe Files y stem Fla gs1 0.031 10244.575 prim a ry f a t 32 boot, lba2 10244.575 38162.219 extended lba7 10244.637 23242.478 logic a l ext 38 23242.509 24238.696 logic a l ext 36 24246.571 25242.758 logic a l linux - sw a p 5 25250.634 38162.219 logic a l f a t32

  • 8/9/2019 LPI 101 Practice 03

    4/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    Managing Disk Storage

    Ma ke p a rtition( p a rted )h elp mkp a rt( p a rted ) mkp a rt PART-T YPE START E ND

    La bel p a rtitione 2 la bel / dev /h d a1 / d a t aRemove p a rtition

    ( p a rted ) rm minor

  • 8/9/2019 LPI 101 Practice 03

    5/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    Managing Disk Storage

    Resize p a rtition

    ( p a rted ) resize MINOR START E ND

  • 8/9/2019 LPI 101 Practice 03

    6/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    Checkinstall Tool

    Th e steps m a ke bin a ry p a ck a ge from source

    ./ configurem a kem a ke inst a llch eckinst a ll

  • 8/9/2019 LPI 101 Practice 03

    7/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    H ow to install checkinstall tool

    Downlo a d source from h ttp ://a sic -

    linux . com . mx /~ izto / ch eckinst a ll / index .p h pt a r xfz ch eckinst a ll-1.6.0. ta r .gzcd ch eckinst a ll-1.6.0m a kem a ke inst a ll

  • 8/9/2019 LPI 101 Practice 03

    8/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    A Network File Sy stem ( NFS)a llows remote h osts to mount file s ystems over a network a nd inter a ct wit h t h ose file s ystems a s t h oug h t h e y a re mounted loc a lly. Th is en a bles s ystem a dministr a tors to consolid a te resources onto centr a lized servers on t h e network .

    Th ree versions of NFSNFS version 2 ( NFS v2)NFS version 3 ( NFS v3)NFS version 4 ( NFS v4)

  • 8/9/2019 LPI 101 Practice 03

    9/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    NFS v2 a nd NFS v3 use UDP protocol port 2049nfs S t a rts th e a ppropri a te RPC processes to service requests for s ha red NFS file s y stems .nfslock A n option a l service t ha t st a rts th e a ppropri a te RPCprocesses to a llow NFS clients to lock files on th e server .portm a p Th e RPC service for Linux ; it responds to requests for RPC services a nd sets up connections to t h e requested RPCservice .

  • 8/9/2019 LPI 101 Practice 03

    10/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    S ta rting a nd S topping NFS / etc / init . d / portm a p st a tus / sbin / service nfs st a rt / etc / init . d / nfs stop / etc / init . d / nfs rest a rt

  • 8/9/2019 LPI 101 Practice 03

    11/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    NFS S erver Configur a tion

    Th e / etc / exports Configur a tion File ( ) ( )...

    repl a ce wit h t h e director y being exported repl a ce wit h t h e h ost or network to wh ich th e export is being s ha red repl a ce wit h t h e options for t ha t h ost or network

    Hosts 1:S ingle h ost : h ostn a me or ipIp network : 192.168.1.0/24

    Exa mples : / d a ta1 h ost 1 / d a ta2 192.168.2.0/24

  • 8/9/2019 LPI 101 Practice 03

    12/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    Def a ult options :

    rowdel ay: opposite of it is no_wdel ayroot_squ a s h: opposite of it is no_root_squ a s h

    Different two line /h ome bob . ex a mple . com ( rw ) /h ome bob . ex a mple .com ( rw )

  • 8/9/2019 LPI 101 Practice 03

    13/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    Th e exportfs Comm a nd (/ usr / sbin / exportfs )

    Upd a te direct / va r / lib / nfs / xt a b

  • 8/9/2019 LPI 101 Practice 03

    14/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    N etwork File System ( N FS)

    NFS C lient Configur a tion Files

    Use mount comm a ndmount - t -o :

    Edit / etc / fst a bserver> : 0 0

    a utofs Th e a utofs service is used to control t h e a utomount comm a nd t h roug h t h e

    / etc /a uto .m a ster prim a ry configur a tion file / etc /a uto .m a ster

    Ma p - t ype : full p a t h a uto .< mount - point>

    - :

  • 8/9/2019 LPI 101 Practice 03

    15/15

    SAIGONLAB83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102

    Setup ACL for File System

    Mount file s ystem wit h a cl option

    mount o a cl / dev /h d a1 / d a t aUse setf a cl, getf a cl tool 1Exa mples

Search related