Redhat / RHEL / CentOS Linux: Start / Stop / Restart NFS Service [ server ]

by on August 15, 2006 · 3 comments· last updated at September 7, 2011

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:

{ 3 comments… read them below or add one }

1 john piroino April 19, 2007 at 6:21 pm

what can cause a nfs service to stop or freeze

Reply

2 Christian Dreyer November 7, 2007 at 10:19 pm

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

Reply

3 the_guv February 14, 2010 at 12:02 am

and for Portmap:-

sudo service portmap restart

(likely just a Debian thing)

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: