Skip to content

Instantly share code, notes, and snippets.

@eendeego
Created December 19, 2012 23:20

Revisions

  1. eendeego created this gist Dec 19, 2012.
    26 changes: 26 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    ssh <sudoer>@<server>
    sudo su -

    mkdir -p <share-starting-at-/>

    cat > /etc/exports <<EOF
    # /path options clients
    <share-starting-at-/> -network 192.168.1.0 -mask 255.255.255.0
    EOF

    exit

    ssh pi@raspberrypi
    mkdir -p <mountpoint>
    sudo su -
    cat >> /etc/fstab <<EOF
    <server-ip>:<share-starting-at/> <mountpoint> nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
    EOF

    sudo aptitude install nfs-common portmap
    sudo service rpcbind start

    # or

    mount <server-ip>:<share> <mountpoint>