How to share files between linux machines

Posted: April 30, 2011 in Linux

Assuming to share a directory in SERVER A(192.168.0.1) to SERVER B(192.168.0.2).

  • Install NFS service on  both machines: yum install nfs-utils portmap
  • Start the portmap and nfs service
  • In SERVER A, edit /etc/exports and add: /path/to/directory 192.168.0.2(ro). This give SERVER B the RO(read only) permission to /path/to/directory
  • Export the file system: /usr/sbin/exportfs –a
  • Mount –t nfs 192.168.0.1:/path/to/directory /mnt/to/somewhere
For details on /etc/exports configuration file, click HERE
Advertisements

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