Debian NFS

Server

    # cat << EOF >>/etc/exports
    /var/local/share/nfs 10.0.0.101(rw,root_squash,sync,no_subtree_check)

    # cat << EOF >>/etc/hosts.allow
    portmap: 10.0.0.101
    lockd: 10.0.0.101
    mountd: 10.0.0.101
    rquotad: 10.0.0.101
    statd: 10.0.0.101

    # cat << EOF >>/etc/hosts.deny
    portmap: ALL
    lockd: ALL
    mountd: ALL
    rquotad: ALL
    statd: ALL

Restart the services:

    # sudo /etc/init.d/nfs-common restart
    # sudo /etc/init.d/nfs-kernel-server restart

Client

Install the 'nfs-common' package.

Create a suitable mount point and add the following to your /etc/fstab:

    # mkdir -p /var/local/share/nfs
    # cat << EOF >>/etc/fstab
    10.0.0.100:/var/local/share/nfs /var/local/share/nfs nfs rw,hard,intr,nosuid,noexec 0 0
    EOF

References

-- Frank Dean - 15 Feb 2012

Related Topics: DebianTips