Configuration of NFS Server To Share files & Directories Over The Network
Configuration of NFS Server stands for Network File System which used to share the files and folders between Unix/Linux machine over the network.
Check Out: Setup Warning “Login Banner”
Benefits of NFS Server :
1. It allows local access to remote files
2. We can secure this with firewalls and Kerberos
3. The operating system is not necessary to be the same.
Port Number – 2049 for TCP/UDP
File Location – /etc/exports
Packages need to be installed are nfs-utils and portmap
Portmap – It maps calls made from another machine to connect RPC Service. In version 4, it’s not required.
Check Out: Enable/Disable Firewall
On Server Side,
Install Packages nfs-utils
Define the NFS location in /etc/exports and make a directory called testing.
Change domain in /etc/idmadp.conf
Start the Service
systemctl start rpcbind nfs-server
Also, run exportfs -a
On Client Side,
Also, install the Packages mentioned above in the post and start the service.
Now testing, Create a directory on client-side in the Working folder to test.
Run the below command to mount the NFS share
mount -t nfs nfs-server-ip:/location-of-directory-made current-mount-location
Don’t forget to add the port in the firewall,
firewall-cmd –permanent –add-port=2049/tcp
And you can see, Data getting stored on NFS directory Server.