Configuration of the Network File System server

For working of the nfs server we should to install the package nfs-kernel-server.

To configure the nfs-server we should do the following:

1. The creation of a shared directory and write permission to it.

$ mkdir /home/dima/nfsdir
$ chmod -R a+rw /home/dima/nfsdir

2. In to the file /etc/exports we add the line


where /home/dima/nfsdir – is the path to the shared directory on the local machine, – IP-address of the NFS-client, who has allowed access to the directory, rw – access type (write + read).

3. In to the file hosts.allow we add the lines:


4. Running the command:

$ exportfs -rv

where the option r – means updating all file systems, the option v – displays detailed information about the actions carried out by the command exportfs.

$ /usr/sbin/rpc.mountd
$ /usr/sbin/rpc.nfsd