Friday, September 11, 2015

NFS (Network file share)
Description:- The network file system is surtaintly one of the most widly use network services.
NFS is run on the basis pf RPC (remote processor call).if allow the client to auto mount & There for transperntaly access the remote file system on the network. It is used to share disk or folder one linux system to another linux system.
Server side :-
  • Package nfs*
  • Service nfs
  • Port listen 2049
  • Config file /etc/exports




Cleint side :-
Showmount –e <server ip> to search exports list
Fstab & autofstab file system mount in boths
/data *.example.com (rw) or 192.168.0.0/255.255.255.0
(note: put entry in fstab or in autofstab to share data directory)
Server side configuration
  1. Yum install nfs* -y (to install nfs pkgs by yum command)
  2. Mkdir /nfsshare (to create directory)
  3. Vim /etc/exports (make an entry share files)
/nfsshare *.example.com (rw,sync) or
/nfsshare 192.168.0.0/255.255.255.0 (rw,sync)


  1. Save & exit.
  2. Service nfs restart
  3. Chkconfig nfs on
  4. Cd /nfsshare (change working directory)
  5. Touch datafile (in /nfsshare create datafile using touch command)
  6. Chmod 777 –R /datafile (set full permission access to datafile)
  7. Showmount –e (by this command to check exports list)


Client side configuration
1.Auto mount method:-
  • Mkdir –p /nfs/nfsdata (to create a mount piont)
  • Yum install autofs* -y (require pkgs install)
  • Vim /etc/auto.master
/misc /etc/auto.misc
/nfs /etc/auto.misc


  • Save & exit.
  • Vim /etc/fstab
/nfsdata -fstype=nfs desktop12.example.com:/nfsshare


  • Save & exit
  • Service autofs stop
  • Service autofs start
  • Service autofs reload
Reloading maps ……………


2. fstab method
* Mkdir /data1 create a mount point directory
* vim /etc/fstab (make these entry)
192.168.0.12:/nfsshare /data1 nfs defaults 00
* save & exit.
* mount –a (mount a directory)









No comments:

Post a Comment

Linux Tables: Block All Incoming Traffic But Allow SSH

  This is very common scenario. You want to permit access to a remote machine only by SSH. You would like to block all incoming traffic to y...