Step 1: Do a Yum Install
# yum install nfs-utils rpcbind
Step 2: Enable the Service at Boot Time
# systemctl enable nfs-server # systemctl enable rpcbind # systemctl enable nfs-lock (it does not need to be enabled since rpc-statd.service is static.) # systemctl enable nfs-idmap (it does not need to be enabled since nfs-idmapd.service is static.)
Step 3: Start the Services
# systemctl start rpcbind # systemctl start nfs-server # systemctl start nfs-lock # systemctl start nfs-idmap
Step 4: Confirm the status of NFS
# systemctl status nfs
Step 5: Create a mount point
# mkdir /shared-data
Step 6: Exports the Share
# vim /etc/exports /shared-data 192.168.0.0/16(rw,no_root_squash)
Step 7: Export the Share
# exportfs -rv
Step 8: Restart the NFS Services
# systemctl restart nfs-server
Step 9: Configure the Firewall
# firewall-cmd --add-service=nfs --zone=internal --permanent # firewall-cmd --add-service=mountd --zone=internal --permanent # firewall-cmd --add-service=rpc-bind --zone=internal --permanent
References: