NFS server installation on CentOS/Rhel 7.x

NFS server installation on CentOS/Rhel 7.x

Now we will install these packages at the CentOS/Rhel 7.x server as

#yum install nfs-utils nfs_utils-lib

Now create a direcory for sharing

#mkdir /nfs_shared

Change the permissions of the folder as follows :

#chmod -R 777 /nfs_shared

Next we need to start the services as follows :

#systemctl start nfs-server
#systemctl start nfs
#systemctl start rpcbind

Now enable these services to start at boot :

#systemctl enable nfs-server
#systemctl enable nfs
#systemctl enable rpcbind

Now we will share the directory over the network via NFS as follows:

#vim /etc/exports

now add above line

/nfs_shared 192.168.0.101(rw,sync,no_root_squash,no_all_squash)

Now run above command to shared

#exportfs -r

Add the NFS service in firewall as follows :

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

Leave a Reply

Your email address will not be published. Required fields are marked *