How do I start and stop the NFS service and/or server using the command prompt? How do I make sure NFS always stars automatically when system boots or restarts under RHEL based systems?
You can use the following commands under RHEL based systems
Start / Stop / Restart portmap Service under RHEL
Type the following commands:
# /etc/init.d/portmap start
# /etc/init.d/portmap stop
# /etc/init.d/portmap restart
Start / Stop / Restart NFS Service under RHEL / CentOS Linux
Type the following commands:
# /etc/init.d/nfs start
# /etc/init.d/nfs stop
# /etc/init.d/nfs restart
Automatically Start the NFS Server
To start the NFS service automatically at the boot time, enter:
# ntsysv
Select Portmap and NFS and save the changes. ntsysv command is a simple interface for configuring runlevel services which are also configurable through chkconfig command.
You should follow me on twitter here or grab rss feed to keep track of new changes.
This FAQ entry is 4 of 14 in the "Linux / UNIX NFS File Server Tutorial" series. Keep reading the rest of the series:- CentOS / Redhat: Setup NFS v4.0 File Server
- Debian / Ubuntu Linux: Setup NFSv4 File Server
- Mac Os X: Mount NFS Share / Set an NFS Client
- RHEL: How Do I Start and Stop NFS Service?
- How To Restart Linux NFS Server Properly When Network Become Unavailable
- Linux Iptables Allow NFS Clients to Access the NFS Server
- Debian / Ubuntu Linux Disable / Remove All NFS Services
- Linux: Tune NFS Performance
- Mount NFS file system over a slow and busy network
- Linux Track NFS Directory / Disk I/O Stats
- Linux Disable / Remove All NFS Services
- Linux: NFS4 mount Error reason given by server: No such file or directory
- Linux NFS Mount: wrong fs type, bad option, bad superblock on fs2:/data3 Error And Solution
- CentOS / RHEL CacheFS: Speed Up Network File System (NFS) File Access













{ 3 comments… read them below or add one }
what can cause a nfs service to stop or freeze
IF you’re using the package nfs-kernel-server you have to substitute nfs for nfs-kernel-server instead. So you’d type
# /etc/init.d/nfs-kernel-server stop
instead
cheers
and for Portmap:-
sudo service portmap restart
(likely just a Debian thing)