1、 sudo apt-get install nfs-kernel-server
2、 sudo dpkg-reconfigure portmap
#对Should portmap be bound to the loopback address? 选N.
3、sudo service portmap restart
sudo vi /etc/exports
输入:/nfs 192.168.1.0/24(rw,nohide,insecure,no_wdelay,no_root_squash,no_subtree_check,sync)
#特别要注意上面的IP的形式,以前是形如192.168.1.*,现在是IP/掩码为数的形式。用旧的格式可能会出问题
sudo exportfs -r
sudo /etc/init.d/nfs-kernel-server restart
showmount -e 127.0.0.1
阅读(1191) | 评论(0) | 转发(0) |