Wednesday, 4 September 2013

Export a directory via NFS

  1. Create a directory eg. /comon
    1. #mkdir /common
  2. Install package
    1. #yum install nfs-utils
  3. Change Mode(chmod) of the directory
    1. #chmod 777 /common
  4. Make entry in the /etc/exports file
    1. #vim /etc/exports
      1. (r,w) access only to 192.168.0.1 Network
        1. /common         192.168.0.1/255.255.255.0(rw,sync)
      2. (r) access to all
        1. /common         *(ro,sync)
      3. give access to root on host 192.168.0.25
        1. /common          192.168.0.25(rw,no_root_sqash,sync)
      4. NFS to example.com domain only
        1. /common          *.example.com(rw,sync)
  5. Save & quit
  6. Restart nfs
    1. #service nfs restart
  7. #chkconfig nfs on
  8. To verify,
    1. Virtual M/c   #showmount -e localhost




No comments:

Post a Comment