Use NIS+ commands to set up an NIS+ server. In this example, the master server is named master1, and the new replica is named replica2.
The NIS+ principal performing this operation must have modify rights to the domain's directory object.
The new replica server must already be configured as an NIS+ server, as described in Setting Up an NIS+ Server.
The domain must have already been configured and have a master server up and running.
You also need the following information:
Name of the server
Name of the domain
Log in to the domain's master server.
Make sure the NIS+ serive is running.
master1# svcs -l network/rpc/nisplus:default
Add the replica to the domain.
Run the nismkdir command with the -s option. The example below adds the replica machine named replica2 to the doc.com.domain.
master1# nismkdir -s replica2 doc.com. master1# nismkdir -s replica2 org_dir.doc.com. master1# nismkdir -s replica2 groups_dir.doc.com.
When you run the nismkdir command on a directory object that already exists, it does not recreate the directory but modifies it, according to the flags you provide. In this case, the -s flag assigns the domain an additional replica server. You can verify that the replica was added by examining the directory object's definition, using the niscat -o command.
Never run nismkdir on the replica machine. Running nismkdir on a replica creates communications problems between the master and the replicas.
Your new replica is now configured. You can now load your NIS+ data set on to the replica. You can do this in two ways:
nisping. If you do nothing, your master server will use the nisping command to load your namespace data on to your newly configured replica server. If your namespace is large, this process can take hours. During this process, requests for naming information can be delayed. See Using nisping to Load Data Onto an NIS+ Replica Server for details.
Backup and restore. You can interrupt the transfer of data by using the nisping command. You then use the NIS+ backup and restore capabilities to load your namespace data on to a newly configured replica server, as described in Using nisrestore to Load Data Onto an NIS+ Replica Server. Because it is so much faster and more efficient, this is the preferred method.