1:nfs-server的搭建。

install the NFS Server: sudo apt install nfs-kernel-server

2:配置server.

vim /etc/exports

for example add:

/ubuntu  *(ro,sync,no_root_squash)
/home *(rw,sync,no_root_squash)

3: 安裝client:

sudo apt-get install nfs-common

4: 在client 掛載。

sudo mount host_server:path local_path

5:啟動服務
重啟portmapper(埠對映)服務
lingd@Ubuntu:~$ sudo service portmap restart
portmap start/running, process 550
重啟NFS服務
lingd@ubuntu:~$ sudo service nfs-kernel-server restart
 * Stopping NFS kernel daemon                                            [ OK ] 
 * Unexporting directories for NFS kernel daemon...                      [ OK ] 
 * Exporting directories for NFS kernel daemon...                        [ OK ] 
 * Starting NFS kernel daemon

參考:https://help.ubuntu.com/lts/serverguide/network-file-system.html

   http://blog.csdn.net/gujintong1110/article/details/42219039