How To Set Up an NFS Mount on CentOS
Server
Download NFS utils and libs
sudo yum install nfs-utils nfs-utils-lib
Add sharing points to exports file
sudo vi /etc/exports
Add one sharing point per line, sharing /media/data and /mount to specific network range will look like:
/media/data 192.168.100.0/24(rw,no_root_squash) /mont 192.168.100.0/24(rw,no_root_squash)
Starting the NFS server and enabling rpcbind
sudo systemctl enable nfs-server.service sudo systemctl start nfs-server.service sudo systemctl enable rpcbind sudo systemctl start rpcbind
Client
Download NFS utils
sudo yum install nfs-utils nfs-utils-lib
Verify available paths to mount on server
sudo showmount -e 192.168.100.24
Mount the source
sudo mkdir /media/data sudo mount 192.168.100.24:/media/data /media/data sudo mount
Enable the mount on fstab
sudo vi /etc/fstab
Add the recently created mount
192.168.100.24:/media/data /media/data nfs rw,sync,hard,intr 0 0