以下在服务器端操作
#关闭防火墙或者开启防火墙端口
sudo ufw disable #关闭防火墙
开启 111 2049
#安装nfs
sudo apt-get install nfs-kernel-server
#配置同步文件
sudo vim /etc/exports
#在末尾加上
/home/daysmark/nfsdir *(rw,sync,no_root_squash)
#/home/daysmark/nfsdir 同步的文件
#sudo /etc/init.d/nfs-kernel-server restart //重启nfs服务
#showmount -e //显示共享出的目录
以下客户端操作
sudo apt-get install nfs-common #安装nfs-common
sudo mount -t nfs 10.20.111.200:/www/wwwroot/6ixty8ight/ /mnt/6ixty8ight //共享文件
sudo umount /mnt/6ixty8ight //取消挂载