您的位置:首页 > 其它

ubuntu 下 配置nfs服务

2017-06-24 11:25 489 查看
1.卸载nfs清除配置sudo apt-get  remove --purge nfs-kernel-server 2.安装sudo apt-get install nfs-kernel-server3.配置vim /etc/export
1 # /etc/exports: the access control list for filesystems which may be exporte    d
2 #       to NFS clients.  See exports(5).
3 #
4 # Example for NFSv2 and NFSv3:
5 # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_    subtree_check)
6 #
7 # Example for NFSv4:
8 # /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
9 # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
10 #
11 /home *(rw,sync,no_root_squash,no_subtree_check)
/home/aaa :要共享的目录
* ;允许所有网段访问
rw :读写权限
sync :同步写入
no_root_squash :nfs客户端拥有共享目录的使用权限
no_subtree_check : 不检测子目录
4.修改共享目录的权限sudo chmod 777 /home/aaa5.启动nfs服务sudo service nfs-kernel-server restart6.本机测试sudo mount -t nfs localhost:/home/aaa /mntls /mnttouch /mnt/bbls /home/aaa7.开发板测试mount -t nfs -o nolock 本机ip:/home/aaa /mnt8.卸载unmount /mnt
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: