Configure NFS Server and Auto-Mount Clients on CentOS 7
This guide walks through installing NFS utilities, creating a shared directory, configuring /etc/exports, starting the NFS service, and setting up client machines with /etc/fstab for automatic mounting on CentOS 7, including verification steps.
NFS Server Configuration
Install NFS utilities : yum install nfs-utils Create shared directory : mkdir -p /nfs/data Edit /etc/exports and add: /nfs/data *(insecure,rw,sync,no_root_squash) Apply the export table : exportfs -ra Start and enable the NFS service :
systemctl start nfs
systemctl enable nfsVerify the export :
showmount -e 192.168.178.224NFS Client Configuration
Install NFS utilities : yum install nfs-utils (Optional) Adjust firewall to allow NFS/rpcbind ports.
Edit /etc/fstab and add:
192.168.178.224:/nfs/data /nfs/data nfs defaults 0 0Mount the share :
mount -a
# or
mount 192.168.178.224:/nfs/data /nfs/data/Verify the mount with:
df -hSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Raymond Ops
Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
