Saturday, 27 June 2015

How to configure NFS RHEL, CENTOS, FEDORA

In this example, the client is and the server is 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@amir ~]# mkdir /home/sharing
2:Edit /etc/exports, insert the client computer  ip
 vi /etc/exports
and  add  this line:
 save  and  exit
3:  Edit /etc/hosts.allow
vi  /etc/hosts.allow
add  :  portmap:
save  and  exit.
 4:  start nfsand  portmap :
[root@amir ~]#  /etc/init.d /nfs start
[root@amir ~]#  /etc/init.d /portmap start
On the client
/etc/init.d/portmap start
Mount the nfs folder
mount /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 : on /mnt type nfs (rw,addr=
Edit /etc/fstab to mount the shared folder on boot  :
vi /etc/fstab
add mnt nfs rw,hard,intr 0 0
 save  and  exit .

No comments:

Post a Comment