Tuesday, August 24, 2010

NFS Server Configuretion

################### NFS ###################################

Requirements
• Packages
  portmap-4.0-63.i386.rpm
  nfs-utils-1.0.6-46.i386.rpm
• Port Numbers
  2049       Nfsd
  111        Portmap
• Configuration File
  /etc/exports
• Service
  portmap
  nfs
• Daemons
  nfsd
  mountd
  statd
  lockd


1)To install packages.
#rpm -ivh portmap-4.0-63.i386.rpm
#rpm -ivh nfs-utils-lib-devel-1.0.8.i386.rpm

2)to create directory.
# mkdir /share

3)to export directory.
#vim /etc/exports
/share *(rw,sync)    -- sync --> syncronisation.
or
/share 10.0.0.0/255.0.0.0(ro,sync)
or
/share 10.0.0.0/255.0.0.0(ro,async)

4)to restart the services.
#service portmap restart
#service nfs restart

5)To check nfs server.
#showmount -e
#showmount -e 10.0.0.1


#####################################################################


Configuring Client

1)Create Mount point on client
#mkdir /nfs

2)Mount remote shared filesystem on local mount point
#mount 10.0.0.1:/share /nfs
#cd /nfs



###################### Advanced Practical #############################




*To share the nfs server for different networks.

1)To assigne the virtual IP.
2)export the directory & assigne the permitions.
3)restart the service.
4)Try to connect from client side.


*To assigne the virtual IP.
#netconfig --device eth0:1
10.0.0.2 255.0.0.0

*Restart the service.
#service network restart

*To configure the export file.
#vim /etc/exports

/share 10.0.0.3/8(ro,sync)

/share 10.0.0.0/8(rw,sync)

/reliance 192.168.1.0/24(rw,sync)

*To create the directory.
#mkdir /reliance
#chmod 777 /reliance/

*To restart the service.
# service portmap restart
#service nfs restart

*To check.
#exportfs -rav



############## Client side configuretion.##########################

*To check from clientside.
#showmount -e (server IP)
#showmount -e 10.0.0.2
*To create the directory.
#mkdir /mount

*To mount the export directory by server.
#mount 10.0.0.2:/reliance /mount

*Directory should be mount but that directory is a read-only.


###################### END ###############################