To begin NIS service from the command line, run the /usr/lib/netsvc/yp/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.