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
Raymond Ops
Configure NFS Server and Auto-Mount Clients on CentOS 7

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 nfs

Verify the export :

showmount -e 192.168.178.224
NFS export verification
NFS export verification

NFS 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 0

Mount the share :

mount -a
# or
mount 192.168.178.224:/nfs/data /nfs/data/

Verify the mount with:

df -h
Mounted NFS verification
Mounted NFS verification
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem AdministrationclientNFScentos7
Raymond Ops
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

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.