Skip to main content

Configuring NFS

Installation & Setup


Guidance based on RHEL/CentOS 7

When installing NFS most chose either NFSv3 or NFSv4, if you have no specific reason to chose one then go with the latter. You can install this on CentOS/RHEL with the following:
  • SERVER: (172.45.55.64)
yum install nfs-utils rpcbind
  • If this is not a cluster then start these at boot time:
systemctl enable --now rpcbind nfs-server nfs-lock nfs-idmap
  • Add this to /etc/exports
/nfsshare 172.45.55.65(rw,sync,no_root_squash)
  • Followed by:
exportfs -a
  • CLIENT: (172.45.55.65)
yum install nfs-utils
  • Testing:
mkdir /nfsshare && mount -t nfs 172.45.55.64:/nfsshare /nfsshare
  • If this works then you're sorted - add this to /etc/fstab:
172.45.55.64:/nfsshare /nfsshare nfs rw,relatime,vers=4,_netdev,timeo=100,retrans=4 0 0
  • Lastly run:
mount -a