Difference between revisions of "CentOS 7.x Configure basic NFSv4 server for sharing folders between two machines"
m |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x file sharing|File sharing]] > [[CentOS 7.x NFS|NFS]] > [[CentOS 7.x Configure basic NFSv4 server for sharing folders between two machines]] | |||
'''There is updated article on this at [[CentOS 9.x Configure basic NFSv4 server for sharing folders between two machines]]''' | |||
On NFS4 server where folder to be shared is present, edit /etc/exports and add: | On NFS4 server where folder to be shared is present, edit /etc/exports and add: | ||
Line 36: | Line 37: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x file sharing|File sharing]] > [[CentOS 7.x NFS|NFS]] > [[CentOS 7.x Configure basic NFSv4 server for sharing folders between two machines]] |
Latest revision as of 16:11, 28 August 2022
Home > CentOS > CentOS 7.x > File sharing > NFS > CentOS 7.x Configure basic NFSv4 server for sharing folders between two machines
There is updated article on this at CentOS 9.x Configure basic NFSv4 server for sharing folders between two machines
On NFS4 server where folder to be shared is present, edit /etc/exports and add:
<folder-to-be-shared> *(rw,no_root_squash,crossmnt)
Ensure that nfsserver is running:
systemctl enable nfsserver systemctl start nfsserver
On the NFS4 server disable firewall and SELinux for easy configuration:
systemctl disable firewalld systemctl stop firewalld setenforce 0 #edit /etc/sysconfig/selinux and set SELINUX=disabled
To verify that folders are exported properly use:
showmount -e exportfs -v
to see exported filesystems and related export options.
Finally, on client test using:
mount -t nfs4 <nfs4-server-ip-or-fqdn>:<exported-folder> <client-mount-point>
If this test is successful, add appropriate lines in /etc/fstab to automatically mount the nfs share on client boot.
Home > CentOS > CentOS 7.x > File sharing > NFS > CentOS 7.x Configure basic NFSv4 server for sharing folders between two machines