practice nfs samba
Post on 30-May-2018
218 Views
Preview:
TRANSCRIPT
-
8/9/2019 Practice Nfs Samba
1/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
PRACTICE SWAP SPACEPRACTICE SWAP SPACE
-
8/9/2019 Practice Nfs Samba
2/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Objectives
Network File System (NFS)
SAMBA
-
8/9/2019 Practice Nfs Samba
3/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
A Network File System (NFS)a llows remote hosts to mount file systems over a network a nd inter ac twith those file systems a s though they a re mounted lo ca lly. Thisen ab les system a dministr a tors to c onsolid a te resour c es onto c entr a lizedservers on the network.
Three versions of NFS
NFS version 2 (NFSv2)
NFS version 3 (NFSv3)NFS version 4 (NFSv4)
-
8/9/2019 Practice Nfs Samba
4/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
NFSv2 a nd NFSv3 use UDP proto c ol port 2049nfs St a rts the a ppropri a te RPC pro c esses to servi c erequests for sh a red NFS file systems.nfslo c k An option a l servi c e th a t st a rts the a ppropri a teRPC pro c esses to a llow NFS c lients to lo c k files on theserver.
portm a p The RPC servi c e for Linux; it responds torequests for RPC servi c es a nd sets up c onne c tions to therequested RPC servi c e.
-
8/9/2019 Practice Nfs Samba
5/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
St a rting a nd Stopping NFS/et c / init.d /portm a p st a tus
/sb in /servi c e nfs st a rt/et c / init.d /nfs stop/et c / init.d /nfs rest a rt
-
8/9/2019 Practice Nfs Samba
6/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
NFS Server Configur a tionThe /et c /exports Configur a tion File
( ) ( )...
replac
e with the directory
being exported
repl ac e with the host or network to whi c h the export is b eingsh a red
repl ac e with the options for th a t host or network H osts1:
Single host: hostna
me or ip Ip network: 192.168.1.0 /24
Ex a mples:
/d a ta 1 host1
/d a ta 2 192.168.2.0 /24
-
8/9/2019 Practice Nfs Samba
7/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
Def a ult options:
ro
wdel a y: opposite of it is no_wdel a y
root_squ a sh: opposite of it is no_root_squ a sh
Different two line/home b ob .ex a mple. c om(rw)/home b ob .ex a mple. c om (rw)
-
8/9/2019 Practice Nfs Samba
8/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
The exportfs Comm a nd ( /usr /sb in /exportfs)
Upd a te dire c t /va r / lib /nfs /xt ab
-
8/9/2019 Practice Nfs Samba
9/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Network File System (NFS)
NFS Client Configur a tion Files
Use mount c omm a nd mount -t -o :
Edit /et c /fst ab
server> : 0 0
a utofs The a utofs servi c e is used to c ontrol the a utomount c omm a nd through the
/et c / a uto.m a ster prim a ry c onfigur a tion file
/et c / a uto.m a ster
M a p-type: full p a th a uto.
- :
-
8/9/2019 Practice Nfs Samba
10/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Setup ACL for File System
Mount file system with ac l option
mount o ac l /dev /hd a 1 /d a ta
Use setf ac l, getf ac l tool1
Ex a mples
-
8/9/2019 Practice Nfs Samba
11/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Why Use S a m ba?
Sa m ba is useful if you h a ve a network of b othWindows a nd Linux m ac hines
Sa m ba a llows files a nd printers to b e sh a red b y a llthe systems in a network
-
8/9/2019 Practice Nfs Samba
12/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
Configuring a Sa m ba Server
Gr a phi ca l Configur a tionComm a nd Line Configur a tion
modify /et c /sa m ba /sm b .c onf a fter /et c / init.d /sm b rest a rtsm b .c onf form a t
workgroup = WORKGROUPNAME ser ver str ing = BRIEF COMMENT ABOUT SERVER
[ sharename ]comm ent = Insert a comment here
pa th = /home/share/
valid user s = user1 u ser2 pu blic = nowr ita ble = yes
pr inta ble = nocr eate mask = 0765
-
8/9/2019 Practice Nfs Samba
13/14
-
8/9/2019 Practice Nfs Samba
14/14
SAIGONLAB 83 Nguy n Th Nh , P9, Q.Tn B nh, Tp. HCM LPI 102
St a rting a nd Stopping the Server
/sb in /servi c e sm b st a tus/sb in /servi c e sm b st a rt
/sb in /servi c e sm b stop/sb in / c hk c onfig --level 345 sm b on
sm bc lient // / -U
mount -t sm b fs -o usern a me=
// / /mnt/point/
top related