Operations 5 min read
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.
Raymond Ops
Raymond Ops
NFS Server Configuration
Install NFS utilities :
<code>yum install nfs-utils</code>Create shared directory :
<code>mkdir -p /nfs/data</code>Edit /etc/exports and add:
<code>/nfs/data *(insecure,rw,sync,no_root_squash)</code>Apply the export table :
<code>exportfs -ra</code>Start and enable the NFS service :
<code>systemctl start nfs
systemctl enable nfs</code>Verify the export :
<code>showmount -e 192.168.178.224</code>NFS Client Configuration
Install NFS utilities :
<code>yum install nfs-utils</code>(Optional) Adjust firewall to allow NFS/rpcbind ports.
Edit /etc/fstab and add:
<code>192.168.178.224:/nfs/data /nfs/data nfs defaults 0 0</code>Mount the share :
<code>mount -a
# or
mount 192.168.178.224:/nfs/data /nfs/data/</code>Verify the mount with:
<code>df -h</code>Written by
Raymond Ops
Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.
0 followers
Reader feedback
How this landed with the community
Rate this article
Was this worth your time?
Discussion
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.