This tutorial is going to show you how to create an NFS (Network File System) server on CentOS 6. I am using ClearOS version 6.7 on this tutorial and it works perfectly. NFS is a flexible filesystem you can use for many purposes such as backup etc. Personally, I use this NFS for storing Proxmox Virtual Machine backup.
To create NFS Server, make sure you have root access to the server machine. I use “server” term for computer that share the NFS directory to the clients on the network. And on this example, my Server IP Address would be 10.34.0.5.
STEP 1 Install NFS
Open Terminal and login as root. Next execute this command to install nfs package and utilities
yum install nfs-utils
STEP 2 create new NFS directory
Now create a new directory that we want to share via NFS. For example I create a new directory called /share/nfs_01
mkdir -p /share/nfs_01
chmod -R 777 /share/nfs_01
*I am not pretty sure if the second command really needed. Play with it to see the differences.
STEP 3 Edit the exports file
Next edit the file /etc/exports. Add the following line to the file
STEP 4 enable the services
Next we need to enable some services. Use this commands
We can also enable those services on startup
chkconfig rpcbind on
chkconfig nfslock on
chkconfig nfs on
Done. Next time I will post how to mount this NFS Share on Linux and Windows. Cheers