From ArchWiki
Revision as of 10:03, 10 March 2007 by Cheer (talk | contribs) (i18n links added)
Jump to navigation Jump to search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end


The goal of this article is setting up a nfs-server for sharing files over a network. We'll keep it simple here, so everything should be pretty much understandable.

Required packages

Required packages for both the server and the client are minimal.
You'll only need to install:

  • current/nfs-utils

Setting up the server

You need to have installed the nfs-utils package by now.
You can now start the daemons and start editing some files.


You should a few daemons (as root) to start the nfs-server:

/etc/rc.d/portmap start
/etc/rc.d/nfslock start
/etc/rc.d/nfsd start

You could add these daemons to the daemon-array in /etc/rc.conf to make them start on system-boot.



This file (/etc/exports) contains the various shares and their permissions of the nfs-server.
A few examples:

/files *(ro,sync) ; Read-only access to anyone
/files,sync) ; Read-write access to a client on
/files,sync) ;  Read-write access to all clients from to

To make changes effective you should issue the following commando (again as root):

exportfs -a


To allow network access to the nfs server you should add the following to /etc/hosts.allow (as root). This puts these services open to anyone, so you should probably read up on security :p

 nfsd: ALL
 portmap: ALL

Setting up the client

Auto-mount on boot