LPI Linux Certification in a Nutshell, 2nd Edition
by Steven Pritchard, Bruno Gomes Pessanha, Nicolai Langfeldt, James Stanger, Jeff Dean
Objective 2: Configuring an NFS Server
The Network File System (NFS) is the standard method for sharing files between Unix (and Unix-like) systems. Linux can be both an NFS server (offering its directories to other systems) and an NFS client (offering its own users access to directories on other systems).
The NFS Server
The NFS server can be installed by default during your distribution's installation process, but if NFS was not installed, you can install it from your distribution's installation media or FTP site. In addition to the NFS packages, you will need the following daemons and utilities.
- Portmap
The NFS server system must be running the portmap daemon, a server for the RPC service directory.
- The NFS-related RPC daemons
These are typically started automatically at boot time through /etc/init.d/nfs start and consist of:
- rpc.nfsd
Handles file serving
- rpc.statd and rpc.lockd
Handle lock management
- rpc.rpquotad
Manages quotas
- rpc.mountd
Checks mount requests and hands out access handles
Configuring NFS Server Exports
The server uses /etc/exports to configure NFS filesystems that it offers to remote systems. The format of the file entries is typically:
/path/to/export[host](options)
The first field, /path/to/export, is the path that you want to make available via NFS. An example would be /mnt/cdrom. The second field, host, is the hostname, specified by name or IP address (with an optional netmask), to which you want the filesystem to be made available. If nothing is supplied ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access