安装nfs:
sudo apt-get install nfs-kernel-server
建立nfs共享文件夹:
sudo mkdir /home/share/nfs
sudo vi /etc/exports
配置nfs:
在文档的最后一行加入
/home/song/nfs *(rw,sync,no_root_squash,no_subtree_check)
保存退出。
重启rpcbind
s
udo /etc/init.d/rpcbind restart
重启nfs
sudo /etc/init.d/nfs-kernel-server restart
sudo mount -t nfs 192.168.1.122:/home/share/nfs mnt
在目标机中挂载服务器的共享文件夹,把以上指令写到/etc/rc.local 当中可实现开机自动挂载