System Administration Guide: Naming and Directory Services (NIS+)

ProcedureHow to Configure a Replica Server With NIS+ Commands

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.

Before You Begin

The NIS+ principal performing this operation must have modify rights to the domain's directory object.

You also need the following information:

  1. Log in to the domain's master server.

  2. Make sure the NIS+ serive is running.

    master1# svcs -l network/rpc/nisplus:default
  3. 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

    master1# nismkdir -s replica2 
    master1# nismkdir -s replica2 
    master1# nismkdir -s replica2

    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.

    Caution – Caution –

    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.