Language and Page Formatting Options
21.5. Starting and Stopping NFS
To run an NFS server, the
portmapservice must be running. To verify that
portmapis active, type the following command as root:
service portmap status
portmapservice is running, then the
nfsservice can be started. To start an NFS server, as root type:
service nfs start
nfslockalso has to be started for both the NFS client and server to function properly. To start NFS locking as root type:
/sbin/service nfslock start. If NFS is set to start at boot, please ensure that
nfslockalso starts by running
chkconfig --list nfslock. If
nfslockis not set to
on, this implies that you will need to manually run the
/sbin/service nfslock starteach time the computer starts. To set
nfslockto automatically start on boot, type the following command in a terminal
chkconfig nfslock on.
To stop the server, as root, type:
service nfs stop
restartoption is a shorthand way of stopping and then starting NFS. This is the most efficient way to make configuration changes take effect after editing the configuration file for NFS.
To restart the server, as root, type:
service nfs restart
condrestart(conditional restart) option only starts
nfsif it is currently running. This option is useful for scripts, because it does not start the daemon if it is not running.
To conditionally restart the server, as root, type:
service nfs condrestart
To reload the NFS server configuration file without restarting the service, as root, type:
service nfs reload
By default, the
nfsservice does not start automatically at boot time. To configure the NFS to start up at boot time, use an initscript utility, such as
/sbin/chkconfig, /usr/sbin/ntsysv, or the Services Configuration Tool program. Refer to Chapter 18, Controlling Access to Services for more information regarding these tools.