1.下载nfs:apt install nfs-kernel-server
2/配置共享文件: gedit /etc/exports
3.将/nfs 共享给所有用户的全部权限:/nfs *(rw,sync,no_root_squash)
(这里的/nfs 是共享文件夹)
4.重启nfs服务:/etc/init.d/nfs-kernel-server restart
5.重启服务:/etc/init.d/rpcbind restart
6.本机检查配置是否成功:showmount -e
root@ubuntu:/nfs# showmount -e
Export list for ubuntu:
/nfs *
root@ubuntu:/nfs#
表示配置成功
在客户端连接挂载:mount -t nfs -o nolock 192.168.112.225:/nfs /tmp/nfs
在嵌入式开发者pc端配置服务,板子去mount连接
验证:在虚拟机的/nfs目录touch一个文件 在板子上的/tmp/nfs文件夹去看,是否有在虚拟机上新建的文件