Install software on the server: sudo apt-get install Nfs-kernel-server
NFS Profile/etc/exports content (originating from Outbound):
Path user name (permissions)
The path can be *. You can also follow the space, user name, and permission section
The Permissions section is separated by commas with the following: RO the host has read-only access to the shared directory RW the host has read and write access to the shared directory Root_squash client uses root to access the shared folder and the root user is mapped to an anonymous user No_root_squash When the client accesses the shared folder with root, the root user is mapped to an anonymous user anonuid the user on the client is mapped to the user of the specified local user ID by all_squash any user on the client computer when accessing the shared directory Anongid Maps a user on a client computer to a specified local user group Idsync data synchronization writes to memory and hard disk async data is temporarily stored in memory, not directly to the hard drive insecure allow unauthorized access from this machine
After you start NFS and then modify the/etc/exports, you do not have to restart the service and use the exports command to/USR/SBIN/EXPORTFS–RV (V is not required). Then SHOWMOUNT-E can see if it takes effect.
Direct MOUNT-T NFS IP address without SSH: Server path Local Path
Via SSH, as described below.
sudo apt-get install SSHFS
SSHFS username @ Address:/path mount point-p port
Fusermount-u mount point for solution hanging
If the network fault, when the device is busy to suspend, you can force umount-f, with the mount point
It is said that it can be put into the/etc/fstab, but I pass the certificate for authentication, so as not to enter the password, so put the mount name in the user's. Profile.