Sharing files with NFS

On a Red Hat machine, setting up an NFS server is not difficult. The software packages required are nfs-utils and portmap.

The required services for an NFS server on a Red Hat machine are nfs, nfslock, and portmap. 

The /etc/exports file specifies which filesystems on the NFS server are allowed to be shared with other clients. It also specifies the security and performance parameters associated with the filesystem you wish to export. An exports file might look something like this: /home/jd jd(rw,all_squash,anonuid=500,anongid=500)

As for the client configuration, the only service that is required on an NFS client is portmap. You still need NFS support in the kernel, but you do not need to load nfsd.

The first step is to edit the /etc/fstab file as the root user. 

If you want the NFS volume to be mounted automatically on boot, or if you want to allow your users to mount the filesystem, you will want to edit this file. The /etc/fstab entry to mount the above exported filesystem would look something like this:
dev:/home/jd /mnt/floppy nfs exec,suid,rw,rsize=8192,wsize=8192 1 1


Edit /etc/export

Launch the following daemons: 
/etc/rc.d/init.d/portmap start
/etc/rc.d/init.d/nfs start 
-> Starting NFS services:  [  OK  ] Starting NFS quotas: [  OK  ] Starting NFS mountd: [  OK  ] Starting NFS daemon: [  OK  ]

rpcinfo -p to check

If you come back and change your /etc/exports file, the changes you make may not take effect immediately.  You should run the command exportfs -ra to force nfsd to re-read the /etc/exports
file.  If you can't find the exportfs command, then you can kill nfsd with the 
  -HUP flag (see the man pages for kill for details).

Run portmap