1、apt-get install nfs-kernel-server nfs-common
/etc/init.d/nfs-kernel-server restart
2、showmount -e报错
showmount -e
clnt_create: RPC: Unknown host
解决方案:
#systemctl start rpcsvcgssd.service
#systemctl start rpcbind.service
#systemctl start nfs-server.service
但是没有并没解决问题
另一方案:
设置/etc/hosts,将服务器IP解析到服务器主机名。
原因在于解析过程中利用到ip->hostname