Configure NFS SERVER

Tasks:

  1. export your /public directory & make sure it should have read-only permission
  2. Mount /public permanently on /mnt/secure

Solution:

Server configuration

# sudo yum install nfs*

#firewall-cmd –permanent –add-service=nfs  ; firewall-cmd –reload

#mkdir /public

#vi /etc/export

/public    192.168.0.*(ro,sync)

#exportfs -r

Client Configuration

#yum install nfs-utils

#mkdir /mnt/secure

#mount -t nfs <server_ip:/public> /mnt/secure

#vi /etc/fstab

server_ip:/public /mnt/secure  nfs default 0, 0

#mount -a