1) Create an NFS share operation:
0. You have logged on to the system as the root user.
1. By default, the system does not start the NFS service.
Service NFS status
Service NFS start
2. Modify the NFS configuration file/etc/exports, for example
# More/etc/exports
/Nfs 192.168.xx.xxx (RW, sync, no_root_squash) 192.168.xx.xxx (RW, sync, no_root_squash) 192.168.xx.xxx (RW, sync, no_root_squash)
/Nfs indicates which directory is shared, 192.168.xx.xxx and later IP addresses indicate the IP addresses that are allowed to be accessed, RW indicates readable and writable, and sync indicates memory Hard Disk Synchronization, no_root_squash indicates that if the NFS server is mounted as root, the identity is root.
3. Run the command to make the configuration take effect.
The exportfs command takes effect immediately, but it is best to restart the NFS server.
Service NFS restart
2) use the mount command to establish a connection with the shared directory of the LAN
Mount-t nfs 192.168.xx.xxx:/nfs/mnt
The/nfs must be the same as the shared directory in the/etc/exports configuration file above.
3) if other machines want to load the directory on the machine, use the above command. If/mnt has been loaded, you can use umount/mnt to uninstall the resource, or mount it to another directory.
4) release resources and disconnect
Umount/mnt