You need the following information to run nisserver.
The domain name
The client machine name; (client1, in this example)
The superuser password for the root master server
Before you run nisserver to create a replica, be sure the following prerequisites have been met.
The domain must already have been configured and its master server must be running.
The tables of the master server must be populated. (At a minimum, the hosts table must have an entry for the new client machine.)
You must have initialized the new server as a client machine in the domain, as described in Setting Up NIS+ Client Machines.
You must have started the NIS+ service, rpc.nisd, on the new replica server, as described in Setting Up NIS+ Servers.
You must be logged in as root on the root master server. In this example, the root master machine is named master1.
To create a root replica, type the following command as superuser (root) on the NIS+ domain's root master server.
master1# nisserver -R -d doc.com. -h client1 This script sets up an NIS+ replica server for domain doc.com. Domain name: :doc.com. NIS+ server : :client1 Is this information correct? (type 'y' to accept, 'n' to change)
The -R option indicates that a replica should be configured. The -d option specifies the NIS+ domain name (doc.com., in this example). The -h option specifies the client machine (client1, in this example) that will become the root replica.
Type y to continue.
Typing n causes the script to prompt you for the correct information. (See How to Change Incorrect Information When Setting Up NIS+ for what you need to do if you type n.)
Is this information correct? (type 'y' to accept, 'n' to change) y This script will set up machine “client1” as an NIS+ replica server for domain doc.com. without NIS compatibility. The NIS+ server daemon, rpc.nisd, must be running on client1 with the proper options to serve this domain. Do you want to continue? (type 'y' to continue, 'n' to exit this script)
Type y to continue.
Is this information correct? (type 'y' to continue, 'n' to exit this script) y The system client1 is now configured as a replica server for domain doc.com.. The NIS+ server daemon, rpc.nisd, must be running on client1 with the proper options to serve this domain. ...
If you want to run this replica in NIS (YP) compatibility mode, modify the /lib/svc/method/nisplus file to add the -Y option. The file needs modification only if you want the root replica to fulfill NIS client requests and it was not already configured as an NIS-compatible server. See Configuring a Client as an NIS+ Server for more information about creating NIS-compatible servers and NIS+ and the Service Management Facility for more information about using Service Management Facility commands with NIS+.
[Optional] Configure the replica to run in NIS (YP) compatibility mode.
If you want this replica to run in NIS compatibility mode, follow these steps:
Load your namespace data on to the new replica server.
You can do this in two ways:
The preferred method of loading data on to a new replica server is to use the NIS+ backup and restore capabilities to back up the master server, then “restore” that data on to the new replica server. This step is described in detail in How to Load NIS+ Namespace Data by Using the nisrestore Command.
Run nisping. Running nisping initiates a full resynch of all NIS+ data from the master server to this new replica. If your namespace is large, this can take a long time, during which your master server is very busy and slow to respond and your new replica is unable to answer NIS+ requests. This step is described in detail in How to Load NIS+ Namespace Data by Using the nisping Command.
When you have finished loading your namespace data, the machine client1 is now an NIS+ root replica. The new root replica can handle requests from the clients of the root domain. Because there are now two servers available to the domain, information requests can be fulfilled faster.
Using these procedures, you can create as many root replicas as you need. You can also use these procedures to create replica servers for subdomains.