In this tutorial, I will cover how to setup Ubuntu 14.04 (either desktop or server edition) as a NFS server.
First, install nfs-kernel-server
$ sudo apt-get install -y nfs-kernel-server
Next, create a directory which will be used as a network file system. In this example, I will use /var/nfs folder
$ sudo mkdir /var/nfs
Change the owner of the directory
$ sudo chown nobody:nogroup /var/nfs
Change the permission of the directory if you want to allow the clients to have access to read/write
$ sudo chomod 777 /var/nfs
Modify the export config file to let it know which directory will be used as NFS
$ sudo vim /etc/exports
Add the following line to the /etc/exports file
Here, I am assuming that this directory will only be accessed by 192.168.0.101. You may want to change this address if you want. Also, make sure to set your DHCP to reserve this IP address to the desired client.
Create NFS table that holds exports
$ sudo exportfs -a
Finally, simply start up the server
$ sudo service nfs-kernel-server start
That's it. In the next post, I will discuss how to connect to NFS directory from the client side.
By the way, you may want to note the server's IP address
This IP address will be needed for a client to connect to, which will be discussed din the next post.