Friday, September 23, 2016

NFS server on Ubuntu

Setup NFS server on Ubuntu:
   . sudo apt-get install nfs-kernel-server
   . Create a folder for sharing
      . mkdir PATH_TO_SHARE
      . chmod -R 777 PATH_TO_SHARE
   . Edit /etc/exports
      . sudo vi /etc/exports
      . add following line and save
         PATH_TO_SHARE *(rw,sync,insecure,no_root_squash,no_all_squash)
   . Refresh updated /etc/exports
      . sudo exportfs -r
   . Restart NFS server
      . /etc/init.d/nfs-kernel-server restart
   . Check shared NFS folders
      . showmount -e localhost

Connect to NFS server on Ubuntu from Mac OS X

   . Cmd + K (Finder -> Go -> Connect to Server )
     . nfs://IPOfUbuntu:/PATH_TO_SHARE
   . Check what folders have been shared
      . showmount -e IPOfUbuntu
   . Create a mount point
      . mkdir MOUNT_POINT
   . Mount nfs to local MOUNT_POINT folder
      . sudo mount -o resvport,rw -t nfs IPOfUbuntu:/PATH_TO_SHARE MOUNT_POINT

No comments:

Check clients which connect to Mac OS X Wi-Fi Internet Sharing

arp -i bridge100 -a bridge100 may be different on your Mac OSX