Skip to content

Instantly share code, notes, and snippets.

@zh4n7wm
Created May 15, 2019 06:42
Show Gist options
  • Select an option

  • Save zh4n7wm/61f4605c4ac9329e3cc73542fe2d638d to your computer and use it in GitHub Desktop.

Select an option

Save zh4n7wm/61f4605c4ac9329e3cc73542fe2d638d to your computer and use it in GitHub Desktop.
Mac OSX enable NFS Server

创建 nfs 目录

$ mkdir /data/nfs-data

配置 nfs

$ cat /etc/exports
/data/nfs-data -maproot=root -alldirs -rw

启动 nfs

$ sudo nfsd enable
$ sudo nfsd start

查看 nfs export 的目录

$ showmount -e
Exports list on localhost:
/data/nfs-data

测试挂载 nfs 目录

$ mkdir /tmp/nfs
$ mount -t nfs localhost:/data/nfs-data /tmp/nfs

卸载

$ umount /tmp/nfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment