ubuntu1604配置nfs

1.下载nfs:apt install nfs-kernel-server

2/配置共享文件: gedit /etc/exports 

3.将/nfs 共享给所有用户的全部权限:/nfs      *(rw,sync,no_root_squash)

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

验证:在虚拟机的/nfs目录touch一个文件   在板子上的/tmp/nfs文件夹去看,是否有在虚拟机上新建的文件

猜你喜欢

转载自www.cnblogs.com/pingxidubing/p/10954361.html
今日推荐