NFS Server side
1. Install Packages
# yum install nfs-utils
2. Configure exportfs file
#vim /etc/exports //the direcotry /data is shared
#export /data to 192.168.1.0/24
#date: 24/06/13
#author: liushanhu
/data 192.168.1.0/24(rw,async,root_squash)
3. Start require services
#/etc/init.d/rpcbind start //rpcbind accepte port reservations from local RPC services. These ports are then made available (or advertised) so the corresponding remote RPC services can access them. (note rpcbind need start first)
#/etc/init.d/nfs start //starts the NFS server and the appropriate RPC processes to service requests for shared NFS file systems.
#/etc/init.d/nfslock start //activates a mandatory service that starts the appropriate RPC processes which allow NFS clients to lock files on the server.
4. Configure start require services onboot
#chkconfig --level 345 nfs on
NFS Client side
Mount NFS server's exported directory
# mount 192.168.1.7:/data /your_directory //the NFS Server IP: 192.168.1.7
转载于:https://blog.51cto.com/lshcookbook/1252195