Using NFS on RedHat to Share Folder


Server:

  • 192.168.51.57 have folder to share
  • 192.168.51.55 want to access folder in 192.168.51.57

On server 192.168.51.57

  • mkdir -p /home/pandazen/shared
  • nano /etc/exports
    /home/pandazen/shared 192.168.51.55(rw,no_root_squash,sync)
  • exportfs -ra
  • service nfs status
    rpc.svcgssd is stopped
    rpc.mountd is stopped
    nfsd is stopped
    rpc.rquotad is stopped
  • service nfs start
    Starting NFS services: [ OK ]
    Starting NFS quotas: [ OK ]
    Starting NFS mountd: [ OK ]
    Stopping RPC idmapd: [ OK ]
    Starting RPC idmapd: [ OK ]
    Starting NFS daemon: [ OK ]
  • rpcinfo -p | grep nfs
    100003 2 tcp 2049 nfs
    100003 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100227 2 tcp 2049 nfs_acl
    100227 3 tcp 2049 nfs_acl
    100003 2 udp 2049 nfs
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    100227 2 udp 2049 nfs_acl
    100227 3 udp 2049 nfs_acl

On server 192.168.51.55

  • mkdir /mnt/boo
  • nano /etc/fstab
    192.168.51.57:/home/pandazen/shared /mnt/boo
  • mount -v -t nfs 192.168.51.57:/home/pandazen/shared /mnt/boo

Finish, then we can test create a textfile from 192.168.51.57 and then open it from 192.168.51.55.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: