Skip to content

Create a NFS File Share on Redhat/CentOS Server Mount on Mac OSX

by Jon on April 11th, 2011

To create an NFS share on a Redhat/CentOS server there are a number of changes that need to be made to the system. Below I have a quick demonstration on how to add 2 nfs shares to a server. The first share “nfs-share1” is a read/write share for client computers at ip address and 101. Then the second share “nfs-share2” is a read only share for client computers at ip address and 101. This is just a quick example of how to setup a nfs server, there is more work to do from the client side to connect to them but if you have a mac you can test using the command example below the nfs server setup.

yum install nfs-utils.x86_64
/etc/init.d/nfs start
/sbin/chkconfig nfs on
cd /
mkdir nfs-share1
chmod -R 766 nfs-share1
mkdir nfs-share2
chmod -R 766 nfs-share2
echo "/nfs-share1,sync),sync)" >> /etc/exports
echo "/nfs-share2,sync,no_root_squash,no_subtree_check),sync,no_root_squash,no_subtree_check)" >> /etc/exports
exportfs -a
/etc/init.d/nfs restart

Mount a nfs share on your Mac OSX computer. For this to work your Mac ip address has to match what is in the /etc/exports file. You will need to do this from your command line terminal on your Mac.

cd /Volumes
mkdir netshare1
mkdir netshare2
mount -o resvport netshare1/
mount -o resvport netshare2/

From → Linux

  1. jay permalink

    So, what’s the command to access the nfs files on os x?

    • Jay,

      If you are on your Mac just use the terminal and cd into /Volumes/”nfs mount name” or use the Finder program and the nfs share directory will be listed in Volumes.


Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

%d bloggers like this: