Guest User

Untitled

a guest
May 30th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. ### 1. Install NFS on Server
  2. Install the required packages (Ubuntu 12.04):
  3. ```bash
  4. apt-get install nfs-kernel-server portmap
  5. ```
  6.  
  7. ### 2. Share NFS Folder
  8. Open the exports file:
  9. ```bash
  10. vim /etc/exports
  11. ```
  12.  
  13. Add the following line:
  14. ```bash
  15. /home/proudlygeek localhost(insecure,rw,sync,no_subtree_check)
  16. ```
  17.  
  18. Restart NFS Service:
  19. ```bash
  20. service nfs-kernel-server restart
  21. ```
  22. or just export the FS:
  23. ```bash
  24. exportfs -a
  25. ```
  26.  
  27. ### 3. Install NFS Client
  28. Install the client:
  29. ```bash
  30. apt-get install nfs-common portmap
  31. ```
  32. Make a mount folder:
  33. ```bash
  34. mkdir /mnt/nfs-share
  35. ```
  36. Setup an SSH tunnel (local-to-remote port):
  37. ```bash
  38. ssh -fNv -L 3049:localhost:2049 user@hostname
  39. ```
  40. Mount the folder:
  41. ```bash
  42. mount -t nfs -o port=3049 localhost:/home/proudlygeek /mnt/nfs-share
  43. ```
Add Comment
Please, Sign In to add comment