1.) First install nfs-utils
yum -y install nfs-utils
2.) Configure nfs share
Create a directory for your NFS share
mkdir /datastore
Create your NFS share in /etc/exports
echo "/datastore 10.220.101.0/24(rw,sync,no_root_squash)" >> /etc/exports
systemctl restart nfs
/etc/exports is where all NFS shares are defined
Allowed Client IP Range = 10.220.101.0/24
Read and Writing Allowed = rw
no_root_squash = makes it so the default of nobody is not used on the NFS share as a user (not secure in normal environments with user access but it makes sense for our situation)
sync = a good idea because otherwise the nfs server will reply to requests for unwritten/unstable data which can lead to corruption and data loss potentially.
yum -y install nfs-utils
mount 10.10.2.20:/tmp/nfsmount /mnt/nfs/
IP of NFS Server = 10.10.2.20
NFS Share = /tmp/nfsmount
Local Mount Path = /mnt/nfs
Make it permanent with fstab
10.10.2.20:/tmp/nfsmount /mnt/nfs nfs defaults 0 0
Most issues are a result of a few things.
rpc.mountd: refused mount request from somehostname.com for /some/path (/a/path/): illegal port 59201
If you get the above error you are probably using NAT somewhere between the client and server. NAT mapping ends up resulting in high and so-called "insecure" ports to be used (I guess the fact that they are unprivileged and a non-root user could easly sniff or intercept on those ports). However if that's not a concern you modify your exports line like this:
/datastore 10.220.101.0/24(insecure,rw,sync,no_root_squash)