How to Use NFS (Server and Client)
Server
Install the NFS server package:
apt-get install nfs-kernel-server
Add share to /etc/exports
with following mask:
<path> <computer_name>(<options>)
/srv/all *(rw,async,no_subtree_check)
/srv/restricted 192.168.0.0/24(rw,async,no_subtree_check)
When serving to Mac OS X clients, you need to add insecure
to the options. The Darwin default is to assume an "insecure" port, i.e. > 1024.
/srv/restricted 192.168.0.0/24(rw,async,no_subtree_check,insecure)
Reload export file:
exportfs -ra
Client
Show available mounts for a NFS server:
showmount -e <server>
Simply mount:
mount 192.168.0.200:/srv/all /mnt/nfs-server
For mounting at boot time, add something like this to /etc/fstab
:
192.168.0.200:/srv/all /mnt/nfs-server nfs rw 0 0
Links
Written by Marcel Bischoff
Related protips
1 Response
I never needed to set up NFS so far, but I thought it's more complex than that! Thanks for sharing :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Howto
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#