Search This Blog

Wednesday, October 5, 2011

How to configure NFS in RHEL 6 ?

Server settings.

Server side network settings.



 
[root@ora ~]#  yum –y install nfs*

[root@ora ~]#  vi /etc/exports

#(Insert the following entry)

/home 192.168.0.0/24(rw,sync,no_root_squash,no_all_squash)

# options
# /home  = shared directory.
# 192.162.0.0/24  = Range of the network which nfs will 
# grant access to.
# rw = Read and write access.
# ro = Read only access.
# sync = synchronize
# no_root_squash  = enables root access and privilege.
# no_all_squash   = enables user access.
[root@ora ~]# service nfslock restart [root@ora ~]# service nfs restart [root@ora ~]# chkconfig nfslock on [root@ora ~]# chkconfig nfs on
Client Configuration

Client side network settings.

 
[root@delhi ~]#  yum –y install nfs*
[root@delhi ~]#  service nfslock restart
[root@delhi ~]#  service netfs restart
[root@delhi ~]#  chkconfig nfslock on
[root@delhi ~]#  chkconfig netfs on
[root@delhi ~]#  mount –t nfs 192.168.0.63:/home /home
[root@delhi ~]#  df –h
 

 
[root@delhi ~]#  vi /etc/fstab

# insert the following entry in the fstab file

192.168.0.63:/home   /home       nfs        defaults,_netdev           1 1
 

 
[root@delhi ~]#  mount -a

3 comments: