Make NFS in RHEL/Centos and Fedora

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg

This tutorial shows you how to use nfs successfully, you have to configure the server and the client. In this example, the client is 10.10.0.3 and the server is 10.10.0.1. The folder to be shared is

 

/home/sharing, and to be mounted to /mnt on the client

On the server

1: make   this  diretory :

[root@unixmen_net ~]# mkdir /home/sharing

2:Edit /etc/exports, insert the client computer  ip

 vi /etc/exports

and  add  this line:

/home/sharing 10.10.0.3/255.255.255.255(rw,sync)

 save  and  exit

3:  Edit /etc/hosts.allow

vi  /etc/hosts.allow

add  :  portmap: 10.10.0.0/255.255.255.0

save  and  exit.

 4:  start nfsand  portmap :

[root@unixmen_net ~]#  /etc/init.d /nfs start

[root@unixmen_net ~]#  /etc/init.d /portmap start

On the client

 start 

/etc/init.d/portmap start

Mount the nfs folder

mount 10.10.0.1:/home/sharing /mnt

 Check /var/log/messages for any error that might occur

tailf /var/log/messages

Use mount to check if the folder is mounted properly

the  output  should  be  like :

10.10.0.1:/home/sharing on /mnt type nfs (rw,addr=10.10.0.1)

Edit /etc/fstab to mount the shared folder on boot  :

vi /etc/fstab

add

10.10.0.1:/home/sharing mnt nfs rw,hard,intr 0 0

 save  and  exit .

 Voila :”)

 

 Greets unixmen team 

 You can post your comment for this article below , we want to inform you that we don`t answer the comments , issues and problems please report them on the forum.

 

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg