Starting and Stopping NIS From the Command Line
Use the Service Management Facility svcadm commands
or the ypstart/ypstop commands to start and stop NIS from
the command line. When using svcadm, the instance name
is needed only if you are running more than one instance of the service. For
more information, see NIS and the Service Management Facility, or see the svcadm(1M), ypstart(1M), and ypstop(1M) man pages.
To begin NIS service
from the command line, run the svcadm enable command or
the ypstart command.
# svcadm enable network/nis/server:<instance>
# svcadm enable network/nis/client:<instance>
Because there is a slight delay before ypserv is
ready to respond to calls after startup, you should issue a three to five
second sleep after svcadm when calling it from inside a
program or script.
To stop NIS service,
run the svcadm disable command or the ypstop.
# svcadm disable network/nis/server:<instance>
# svcadm disable network/nis/client:<instance>
To stop and immediately
restart an NIS service, use the svcadm restart command.
# svcadm restart network/nis/server:<instance>
# svcadm restart network/nis/client:<instance>