Guest User

Untitled

a guest
Dec 11th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. ##
  2. ## Server
  3. ##
  4.  
  5. sudo aptitude install nfs-kernel-server nfs-common portmap
  6.  
  7. dan@filestore:~$ cat /etc/exports
  8. # /etc/exports: the access control list for filesystems which may be exported
  9. # to NFS clients. See exports(5).
  10. #
  11. # Example for NFSv2 and NFSv3:
  12. # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
  13. #
  14. # Example for NFSv4:
  15. # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
  16. # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
  17. #
  18. /mnt 192.168.1.4(rw,sync,no_subtree_check)
  19. /mnt/test 192.168.1.4(rw,sync,no_subtree_check)
  20.  
  21. dan@filestore:~$ sudo /etc/init.d/nfs-kernel-server restart
  22. dan@filestore:~$ sudo showmount -e
  23. Export list for filestore:
  24. /mnt 192.168.1.10
  25. /mnt/share 192.168.1.4
  26.  
  27. ##
  28. ## Client
  29. ##
  30.  
  31. sudo aptitude install nfs-common portmap
  32.  
  33. dan@office:/mnt$ showmount -e 192.168.1.10
  34. Export list for 192.168.1.10:
  35. /mnt 192.168.1.10
  36.  
  37. dan@office:/mnt$ mkdir /mnt/share
  38. dan@office:/mnt$ sudo mount 192.168.1.10:/mnt /mnt/share/
  39. dan@office:/mnt$ cd share/
  40. dan@office:/mnt/share$ ls
  41. ntfs profiles share usb
  42.  
  43. dan@office:/mnt$ sudo mount 192.168.1.10:/mnt/test /mnt/test
  44. dan@office:/mnt$ cd test/
  45. dan@office:/mnt/test$ ls
  46. a file
Add Comment
Please, Sign In to add comment