How to Set Up and Configure NFS Server and Clients
NFS is widely deployed and used even after more than twenty year. NFS is easy to set up and easy to use. This introduces how to set up the NFS server and clients. We use the Fedora system as the example.
Set up a NFS Server
Configure /etc/exports to give clients the permission to use the NFS directories.Edit /etc/exports
For example, to allow the servers inside subnet 10.0.0.1/24 to mount the /home directory with read/write permission. Add this line to /etc/exports:/home 10.0.0.1/24(rw)For details of the exports functions, please refer to export manual.
Start up the NFS service
Enable nfs service on the NFS server so that the NFS service daemon automatically starts each time the server starts:# /sbin/chkconfig nfs onYou may also manually start it
# service nfs start
Client-slide configuration
Package installation
Install the nfs-utils package:# yum nfs-utils
Start the rpcbind service
Start the service needed by NFS:# service rpcbind restartYou may also set it to start automatically
# chkconfig rpcbind on
Mount the NFS directory
You can mount the NFS directory to the mount point:# mount NFSSERVER:/lhome/userdir MOUNTPOINTwhere NFSSERVER is the NFS server’s address, and MOUNTPOINT is the local mount point on the client side for the NFS directory.
You may also consider using autofs on top of NFS as described in Unified Linux Login and Home Directory Using OpenLDAP and NFS/automount.
By: Zhiqiang Ma
Last updated: Dec 23, 2012
Views: 1,065
Tags: autofs, Client config, Command line, Fedora, Home, mount nfs, NFS, nfs directory, nfs service, permission, point, Server, Server config, service daemon, shell, Start, Tutorial
Tags: autofs, Client config, Command line, Fedora, Home, mount nfs, NFS, nfs directory, nfs service, permission, point, Server, Server config, service daemon, shell, Start, Tutorial