This is an old revision of the document!
[root@lnx01 ~]# yum install nfs-utils [root@lnx01 ~]# firewall-cmd --zone=public --add-service=nfs --permanent [root@lnx01 ~]# systemctl reload firewalld [root@lnx01 ~]# cat /etc/exports /data 190.168.1.0/24(rw,no_subtree_check,no_root_squash) [root@lnx01 ~]# systemctl start rpcbind nfs-server [root@lnx01 ~]# systemctl enable rpcbind nfs-server
When the NFS service starts, he do a exportfs command which validate the content of /etc/exports, and put it into /var/lib/nfs/etab
# cat /var/lib/nfs/etab /data 190.168.1.0/24(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=sys,secure,no_root_squash,no_all_squash)
[root@lnx01 ~]# yum install nfs-utils [root@lnx02 ~]# systemctl start rpcbind [root@lnx02 ~]# systemctl enable rpcbind [root@lnx02 ~]# mount -t nfs -o vers=4 lnx01:/data /mnt [root@lnx02 ~]# cat /etc/fstab ..... lnx01:/data /mnt nfs vers=4,proto=tcp,soft 0 0
Note
For NFSv3 you need additionnal steps
https://computingforgeeks.com/configure-nfsv3-and-nfsv4-on-centos-7/