新闻  |   论坛  |   博客  |   在线研讨会
mount -t nfs 的使用
电子禅石 | 2020-07-24 11:55:25    阅读:4440   发布文章

服务安装:
1. 在VMware Ubuntu中安装NFS服务:
  sudo apt-get install nfs-kernel-server
2. 安装成功会出现配置文件/etc/exports。
  ls /etc/exports
3. 配置vim exports

指定所要共享的目录(绝对路径)           *(rw,sync,no_root_squash)
例:

添加:
/home/xubu/share/ *(rw,sync,no_root_squash,no_subtree_check)  //任意的客户端可连
/home/xubu/share/   192.168.1.1(rw,sync,no_root_squash,no_subtree_check)  //指定的客户端可连

4. 重新启动nfs服务:
sudo service nfs-kernel-server restart

 

 

客户端接入:
1. 确保与服务器的网络连接正常
2. 挂载服务器的共享目录到本地目录
sudo mount -t nfs 192.168.1.200(服务器地址):/home/xubu/share   /mnt(共享到该目录)


*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。

参与讨论
登录后参与讨论
电子禅石  2020-09-18 09:43:04 

挂载时,用 mount -t nfs 192.168.1.105:/ /mnt/nfs 时出现 svc: failed to register lockdv1 RPC service (errno 111) 改为 mount -t nfs -o nolock 192.168.1.105:/ /mnt/nfs

属于自己的技术积累分享,成为嵌入式系统研发高手。
推荐文章
最近访客