Here a simple and quick guide to setting up nfs on a RHEL or centos host:
1. Install the needed nfs packages
yum install nfs-utils nfs-utils-lib
2. Create the directory that you want to mount the remote directory to
mkdir [path to mount point]
3. Add an entry into your systems fstab file to auto-mount the directory upon reboot
sudo vim /etc/fstab
Add a line similar to:
[file server hostname]:[file server path that will be mounted] [mount point on local system] nfs defaults 0 0
4. Then just manually mount the new partition
sudo mount [mount point on local system]
If everything is setup properly and the server is setup to allow the local system to mount the partitions then you should be good to go. If the server is not setup then you will need to adjust it’s nfs settings by editing /etc/exports and executing:
exportfs -a
If you need to make some adjustments the defaults option can be replaced. Here is an example forcing nfs3 to be used:
[file server hostname]:[file server path that will be mounted] [mount point on local system] nfsnfsvers=3
0 0