💾 Archived View for x5dragonfire.flounder.online › articles › software-guides › programs › setup-nfs… captured on 2024-09-29 at 00:26:34. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

How to Setup NFS on linux

Install

'@root

apt install nfs-kernel-server rpcbind

'

Rpcbind

perl -pi -e 's/^OPTIONS/#OPTIONS/' /etc/default/rpcbind
echo "rpcbind: 192.168.1." >> /etc/hosts.allow
systemctl restart rpcbind.service

Exports

Replace <Dir> with your Directory you wish to serve

echo "<Dir> 192.168.1.*(rw,sync,insecure,all_squash,no_subtree_check)" >> /etc/exports  
exportfs -a
/etc/init.d/nfs-kernel-server reload

If you want /etc/exports to share an NFS share to multiple, discrete entries, use space-separate entries. Do This:

echo "/multi-example    192.168.1.0/24(rw) 172.16.1.0/24(ro)  10.11.12.0/24(rw)" >> /etc/exports

NFSv4 only

Set These Varables in /etc/default/nfs-common

NEED_STATD="no"
NEED_IDMAPD="yes"

Read Only

edit /etc/exports and change rw to ro