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