1.Nfs: NFS (Network File system), which is one of the file systems supported by FreeBSD, allows computers in a network to share resources across TCP/IP networks.
In an NFS application, a local NFS client application can transparently read and write to files located on the remote NFS server, just as you would access a local file.
2. Install NFS Server side:Sudoapt-get install nfs-kernel-server;
3.Configuration/etc/exports:sudo vim/etc/exports;
Ubuntu NFS allows mount directories and permissions to be defined in file/etc/exports.
The folder under the root directory/home/uploadDirectory sharing out,
Add the following line at the end of the/etc/exports file:/home/upload* (Rw,sync,no_root_squash)
*: The delegate allows all network segments to be accessed,
RW: is read and Write permission,
Sync: Data is synchronously written to memory and hard disk,
No_root_squash: is the Ubuntu NFS Client sharing the permissions of the directory user, if the client is using root users, that for the shared directory, the client has Root privileges.
4. NFS Restart Service
$sudo/etc/init.d/portmap Restart
$sudo/etc/init.d/nfs-kernel-server Restart
5. Test Ubuntu NFS
You can now run the following command to display the shared directory: $showmount-E
Alternatively, you can use the following command to mount it on a local disk, such as/home/uploadMount
To/mnt: $sudo mount-t NFS 192.168.1.117: /home/upload /home/upload
You can run the DF command to see if the mount succeeds.write file, boot automatically mount. /etc/fstab192.168.1.117:/home/upload/home/upload NFS RW 0 0
(This creates the directory under the/mnt directory, which also appears under/home/upload)
After viewing, you can uninstall by using the following command: $ sudo umount/home/upload
Note: When using the uninstall command, exit the mounted directory before performing the uninstall command, otherwise the device is busy and cannot be uninstalled
Linux NFS Server Setup