Clone wiki

calixto-buildroot / Steps to create NFS server

An NFS server requires some services to run. These are a portmapper daemon, RPC support, and a security service. NFS also requires tools, both for monitoring and for mounting filesystems. Finally, NFS servers require a configuration file.

On Ubuntu, Debian, and similar systems, the services and tools required by an NFS server can be installed with the following command:

 $ apt-get install portmap nfs-kernel-server

Create directory where NFS will be stored

 $ mkdir -p /export/rootfs

Add following export line to /etc/exports to export the /export/rootfs directory as a writeable NFS share with data integrity, reliability and performance options on the network

 $ echo /export/rootfs  *(rw,sync,no_subtree_check,no_root_squash) >> /etc/exports

Run following command to notify the NFS server of the configuration change

 $ exportfs -ra

Restart nfs-kernel-server

 $ /etc/init.d/nfs-kernel-server restart

Note : You may even have to restart the system after setting up NFS server for the first time.