RedHat7 Providing Network Shares to Specific Clients

RedHat7 Providing Network Shares to Specific Clients:


-Install the NFS Server service. Once installed, query the status of the service, enable it for automatic start, start it and then verify it is running.

# yum install nfs-utils

#systemctl status nfs-server

#systemctl enable nfs-server (If not enabled)


-Create the file NFS common file in the /etc/default directory. Add the setting that indicates that IDMAPD is needed for NFS file sharing. Edit the IDMAP configuration file, add the domain of the server (Your SERVER)

# cd /etc/default/

# ll

# vim nfs-common

Add the following line


# vim idmapd.conf

Add the following line



-create a directory in the /mnt directory called 'share'. In this directory, create a file with some text called 'shared.txt'.

# mkdir /mnt/share

# chmod 777 /mnt/share

# echo "This is a test file" >> /mnt/share/shared.txt


-Add this directory to the 'exports' file for NFS. Export the file system ONLY to the IP address of the client machine, no other special options are required, limit the mount ONLY to that second server's IP.

# vim /etc/exports



-Restart the NFS server. Run the appropriate command to show the exported mounts on this localhost.

# systemctl restart nfs-server.service

# systemctl status nfs-server.service –l

# showmount -e localhost

Was this article helpful?
0 out of 0 found this helpful

Have more questions? Contact our support instantly via Live Chat