This is an old revision of the document!
Provide Network Shares To Specific Clients
General Information
Configuring a NFS Server/Client.
NFS Server: Install and Configure
Install required package
yum install nfs-utils
Create directories for exports
mkdir /test1 /test2
Find SELinux boolean nfs export
getsebool -a | grep nfs_export
Set SELinux booleans to on if they are not
setsebool -P nfs_export_all_ro=1 nfs_export_all_rw=1
Allow through the firewall
firewall-cmd --permanent --add-service=nfs firewall-cmd --reload
Enable and start services
systemctl enable nfs-server
systemctl start nfs-server
Create the NFS common file and require IDMAPD for file sharing (optional? - TO VERIFY)
vim /etc/default/nfs-common NEED_IDMAPD=YES
Edit the domain in the idmapd.conf file
vim /etc/idmapd.conf DOMAIN = server1.example.com
- Edit domain as required for system
Edit export settings
vim /etc/exports /test1 192.168.1.10(rw,no_root_squash) /test2 192.168.1.10(ro)
Export directories
exportfs -var
- -v → verbose
- -a → all directories
- -r →
Restart services
systemctl restart rpcbind systemctl restart nfs-server
NFS Client: Install and Configure
Install required package
yum install nfs-utils
Enable and start service
systemctl enable rpcbind
systemctl start rpcbind
Create directories for mounting
mkdir /test1 /test2
Test a manual mount
mount -t nfs -o rw 192.168.1.200:/test1 /test1
Persistent mounts in fstab
vim /etc/fstab 192.168.1.200:/test1 /test1 nfs rw,_netdev 0 0 192.168.1.200:/test2 /test2 nfs ro,_netdev 0 0