ubuntu 16.04 配置 nfs 服务器、客户端

1. 下载和配置 nfs服务器

  • 下载
    apt-get install nfs-kernel-server
  • 配置
    gedit /etc/exports
/nfsdir *(rw,sync,no_root_squash,no_subtree_check)

image.png

注:/nfsdir是作为共享目录

  • 重启 service nfs-kernel-server restart
  • 验证 showmount -e​
    image.png

2. 下载客户端

  • 下载
    apt-get install nfs-common
  • 查看
    showmount -e 192.168.0.200
    image.png
  • 使用
    手动挂载:
    mkdir /othernfsdir
    mount -t nfs -o nolock 192.168.0.200:/nfsdir /othernfsdir/
    自动挂载:
    gedit /etc/fstab
添加一行
...
192.168.0.200:/nfsdir /othernfsdir/ nfs rsize=8192,wsize=8192,timeo=14,intr

重启:reboot

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容