Follow these simple steps to setup an NFS client/server.
First, some housekeeping for this example.
Server machine (server) = 192.168.1.1
Client machine (client) = 192.168.1.2
Exported directory /nfs/export
### The server steps ###
1. Create an entry in /etc/exports with the exported directory and client IP.
The (rw) sets the directory to be read and writeable. There are other options that can be specified here. Check out the NFS docs for more.
2. Edit /etc/hosts.deny and /etc/host.allow
In /etc/hosts.deny
In /etc/hosts.allow
3. Start up portmap, nfs, nfslock, netfs on the server. These can most likely be found in /etc/init.d in the form of init scripts. Make sure they are set to start at boot with chkconfig (Redhat servers).
4. Run rpcinfo and make sure at least nfs, portmap and mountd are listed.
### The client steps ###
5. Make a directory that you you are going to use to mount the NFS share. Call it whatever you want.
6. Start portmap, nfs, nfslock, netfs on the client as you did on the server.
7. Mount the share.
8. Add an entry to /etc/fstab in order to have the share mount after a reboot.
9. Test that you can create/delete/edit files and needed by your application.