|
|
ypinit -s master_name
ypinit -c master_name
ypinit -C
It sets up a master server using the simple model in which that server is master to all maps in the database. This is the way to bootstrap the NIS system; later the association of maps to masters can be changed. All databases are built from scratch, either from information available to the program at runtime or from the ASCII database files in /etc. Some of these files are listed below under ``Files''. Additional files may be handled by the Network Information Service as required by the local environment. All such files should be in their ``traditional'' form.
An NIS database on a slave server is set up by copying an existing database from a running server. The master_name argument should be the hostname of an NIS server, either the master server for all the maps or a server on which the database is up-to-date and stable.
An NIS database on a copy-only server is set up by copying an existing database from a running server. The master_name argument should be the hostname of an NIS server, either the master server for all the maps or a server on which the database is up-to-date and stable. The differences between a slave server and a copy-only server are that the copy-only server does not respond to NIS requests from the network while the slave server does; the copy-only server must poll a master server or slave server to update its maps while a slave server's maps are updated by the master server when the master server changes its maps; and the copy-only server does not keep full copies of both NIS maps and ASCII versions of NIS maps while a slave server keeps full copies of both.
NIS databases are not stored on an NIS client. NIS requests are sent directly to the server to which the client is bound.
In all four cases, ypinit modifies the /etc/nis script to enable the automatic starting of the NIS daemons. It also makes sure that they are started with the correct arguments. If ypinit is run on a host already set up as a master server, copy-only server, or slave server, ypinit clears the host of any entries inserted by the previous execution of ypinit and, therefore, sets up the host from scratch.
Refer to ypfiles(NF) and ypserv(NADM) for an overview of the Network Information Service.