LPI 101 Practice 03

15
8/9/2019 LPI 101 Practice 03 http://slidepdf.com/reader/full/lpi-101-practice-03 1/15 SAIGONLAB 83 Nguy n Th Nh , P9, Q.T ân B ì nh, Tp. HCM LPI 102 PRACTICE 2

Transcript of LPI 101 Practice 03

Page 1: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 1/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân B ì nh, Tp. HCM LPI 102

PRACTICE 2

Page 2: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 2/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân B ì nh, Tp. HCM LPI 102

Objectives

Managing Disk Storage

Checkinstall tool

Network File Sy stem ( NFS)

Page 3: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 3/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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

Page 4: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 4/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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

Page 5: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 5/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân B ì nh, Tp. HCM LPI 102

Managing Disk Storage

Resize p a rtition

( p a rted ) resize MINOR START E ND

Page 6: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 6/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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

Page 7: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 7/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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

Page 8: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 8/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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)

Page 9: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 9/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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 .

Page 10: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 10/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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

Page 11: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 11/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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 <export> <host1> ( <options> ) <hostN> ( <options> )...

repl a ce <export> wit h t h e director y being exported repl a ce <host1> wit h t h e h ost or network to wh ich th e export is being s ha red repl a ce <options> 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

Page 12: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 12/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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 )

Page 13: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 13/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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

Page 14: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 14/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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 <nfs-type> -o <options> <host> : </remote/export> </local/directory>

Edit / etc / fst a bserver> : </remote/export> </local/directory> <nfs-type> <options> 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

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

</local/directory> - <options><server> : </remote/export>

Page 15: LPI 101 Practice 03

8/9/2019 LPI 101 Practice 03

http://slidepdf.com/reader/full/lpi-101-practice-03 15/15

SAIGONLAB83 Nguy n Th Nh , P9, Q.Tân 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