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