To begin NIS service from the command line, run the ypstart script.
# /usr/lib/netsvc/yp/ypstart
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 ypstart when calling it from inside a program or script.
To stop NIS service, run the ypstop script.
# /usr/lib/netsvc/yp/ypstop