2015-02-12

NFS Server & Client

On NFS server (IP: 192.168.0.103) shared a writable folder /nfsdata to everyone under IP subnet 192.168.0.0/24

Server

  • # mkdir /nfsdata
  • # chmod 777 /nfsdata
  • # vi /etc/exports
    • /nfsdata 192.168.0.0/24(rw,sync)
  • # service nfs restart
Client
  • # showmount -e 192.168.0.103
    • Export list for 192.168.0.103:
    • /nfsdata 192.168.0.0/24
  • # mkdir /mnt/nfs
  • # mount 192.168.0.103:/nfsdata /mnt/nfs
  • # cp /etc/passwd /mnt/nfs
An other way to auto connect with NFS server when Client boot up.
  • # vi /etc/fstab
    • 192.168.0.103:/nfsdata /mnt/nfs     nfs     default,soft,intr,timeo=1  0   0
  • # mount /mnt/nfs
  • # reboot

沒有留言:

張貼留言