Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

NFS in four steps
29 October 2004 @ 13:32 BST
by Paul

The Network File System is often shrouded in mystery. But there is nothing to be scared of. It's simple. Here are a few easy steps to installing a nfs server:

  1. Install the software. On Debian you can do this like this:

       apt-get install nfs-user-server

    Debian will automatically ensure that the nfs server is running, other distrubutions may require you to edit your start up scripts.

    Of course, if you want to use the kernel server, which is faster and better for a machine that will mostly be used as an nfs server, you have to have a kernel with nfsd compiled in and install the kernel server tools which on Debian is:

        apt-get install nfs-kernel-server
  2. Ensure /etc/hosts.deny and /etc/hosts.allow are edited. For example in hosts.deny you might want to put:

       ALL: ALL

    to ensure a secure system. In hosts.allow put something like

       ALL: 192.168.0.

    to allow connections from your local network.

  3. Edit /etc/exports. This allows clients to mount shared directories. On my server, I've put:

       /path/to/shared/directory 192.168.0.0/24(rw)

    More info on the options you might use is in 'man exports'.

  4. Finally, the client machine needs to mount it:

       mount -t nfs host.name:/path/to/directory /mnt

And voila!




Comments disabled