NFS Servo END
Portmap 111;nfs 2049
Servo-Side Installation
Yum-y Install Nfs-kernel-server
Enable
Service Nfs-kernel-server Restart Set file
Vi/etc/exports
<export/share point> <client list>
/usr node* (rw,sync,no_root_squash)/home node* (Rw,sync,no_root_squash)
Common NFS Options:
ro, rw: Specify whether this share can be written. ' Ro ' means read-only, the client cannot write; RW indicates that the client can write.
Sync, Async: Sync (Sync) and asynchronous (async) mode, choose one to use. In synchronous mode, programs that access NFS have to wait until the actual read and write action is completed before they return to execution, which is not required by the asynchronous mode, and the program can continue to perform after sending access requirements, speeding up the system's operational efficiency. Basically, although the asynchronous mode is high efficiency, but will increase the system instability factor, when the system when the machine (whether the servo or the client), it is easy to cause the data on the disk error 111cn.net, so the Debian preset is synchronous mode.
It is not recommended that you use asynchronous mode unless you have special needs. If you do not specify the sync or ASYNC,NFS server to print a warning message at startup, we should specify the sync option on all export point.
Root_squash, No_root_squash:nfs in the preset situation will be the Super user account root Uid/gid (0/0) corresponding to nobody, this is Root_squash. We can use No_root_squash to turn off this function.
View NFS for any one host
SHOWMOUNT-E hostname
Mount NFS
Mount-t NFS Hostname:/export/path/mount/point
Client Side
1.NFS server-side first set, new host name to link
Vi/etc/exports
/home newserver.domain.kh.edu.tw (Rw,sync,no_wdelay,nohide,no_root_squash)
Confirm that there is no open Read permission www.111cn.net
Vi/etc/hosts.allow
all:163.32.x.x
When the setting is complete, mount the load again
Exportfs-arv
2.Client-end settings, change home name (home2) in the original machine, and create a new home to link the NFS server home
Umout Home
MV Home Home2
mkdir Home
3. Start Portmap Service
Service Portmap Start
Service Nfslock Start
4. Scan NFS server for shared directory, link to client
SHOWMOUNT-E NFS 163.32.x.x
Or
Mount-t NFS File.domain.kh.edu.tw:/home/home
5. Remote host directly mount to the relevant directory, each boot will be automatically mounted
Vi/etc/fstab
File.domain.kh.edu.tw:/home/home NFS Rw,soft,intr 0 0
6. Restart, and then use the account login test to see it!
Client End 2
Basic Installation
Yum-y Install Nfs-utils
Vi/etc/idmapd.conf # line 5:uncomment and change to your domain name
Domain = localhost.domain.kh.edu.tw
/etc/rc.d/init.d/rpcbind start
/ETC/RC.D/INIT.D/RPCIDMAPD start
/etc/rc.d/init.d/nfslock start
/etc/rc.d/init.d/netfs start
Preset boot up use
Chkconfig Rpcbind on
Chkconfig RPCIDMAPD on
Chkconfig Nfslock on
Chkconfig Netfs on
Mount-t NFS File.domain.kh.edu.tw:/home/home