Build process
Need to install two packages
Yum-y Install Nfs-utils Rpcbind
Profile/etc/exporys (config file only restricts clients)
Example:/Home 192.168.137.22 (Rw,sync,)
[RW read-write RO read-only sync write to disk async asynchronous No_root_squash not limit root, operation is like in native operation, unsafe, not recommended to use Root_squash limit root All_squash No matter who the user is, are limited to a specified normal user.
Anonuid and Anongid to use with All_squash and Root_squash. Specify UID GID precondition is/etc/passwd exists]
Save exit after modifying configuration file
Start/etc/init.d/rpcbind start;/etc/init.d/nfs start
Note: Starting NFS must first start Rpcbind
Then use the command showmount-e 192.168.137.22 (Server for NFS IP) on the client
If this error occurs, you can turn off the temporary firewall
Clnt_create:RPC:Port mapper failure-unable to Receive:errno 113 (No route to host)
Command Service iptables stop
Mount
Mount-t NFS (-o nolock to prevent locks, such as two people operating a file at the same time) 192.168.137.22:/home/mnt (mount point)
Then use Df-h to view the Mount
Exportfs-a all mounts or uninstalls
-R Re-mount
-U Uninstall a directory
-V Show shared directory
The function is to modify the configuration file without restarting the service; Use Exportfs to
/etc/rc.d/rc.local
The system will automatically run this script after booting, so you can add some boot-enabled services, for example, you can write NFS mount commands to this script
Note: This article only makes the simple configuration, the specific configuration may operate according to the actual situation
This article is from the "Ops Siege Lion Diary" blog, please be sure to keep this source http://sjwnote.blog.51cto.com/10587073/1685517
Server for NFS Configuration