windows系统:
参考博客:
https://blog.csdn.net/lzhitwh/article/details/80172561
https://www.cnblogs.com/liyuan3210/p/6377178.html
nfs server下载地址:https://pan.baidu.com/s/1vKPIyVRM0wf4TA4TwWP0rA
下完后直接安装就行(具体安装步骤参考这两篇博客)。
我这里要说的是配置exports的问题:
f:\ftp -name:nfs
只有配置成这样,我连海康摄像头才连接成功,之前配置成f:\ftp -public一直连不上。
ubuntu系统:
参考博客:https://www.linuxidc.com/Linux/2018-03/151384.htm
配置:/home/hhh/ftp 192.168.1.64(rw,sync,no_root_squash)
为了使NFS服务器能正常工作,需要启动rpcbind和nfs-kernel-server两个服务,并且rpcbind一定要先于nfs-kernel-server启动。
启动命令:
sudo service rpcbind start
sudo service nfs-kernel-server start
重启服务器:
sudo service nfs-kernel-server restart
查看路径:
showmount -e 192.168.1.211
若要开机自启动nfs服务,可以通过sysv-rc-conf配置自启动服务。
sudo sysv-rc-conf --level 35 rpcbind on
sudo sysv-rc-conf --level 35 nfs-kernel-server on