NIS server: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
No edit summary
Boiarino (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
CLON cluster has NIS slave servers to provide backup if the NIS master server becomes unavailable. To configure an NIS slave server, complete the following steps on the system that you want to designate as the slave server:
CLON cluster has NIS slave servers to provide backup if the NIS master server becomes unavailable. To configure an NIS slave server, complete the following steps on the system that you want to designate as the slave server:


1. Edit the /etc/inet/hosts file to ensure that the NIS master and all NIS slave servers have been defined.
1. Edit the /etc/hosts file to ensure that the NIS master and all NIS slave servers have been defined. For example on ''clon00'' two extra NIS servers must be specified:


  2. Execute the domainname command to set the local NIS domain.
  #
  # NIS servers
  #
  129.57.167.14  clon10.jlab.org  clon10
  129.57.33.22  ccs10.jlab.org  ccs10
  #


# domainname domainname
2. Create or populate the ''/etc/defaultdomain'' file with the domain name. For clon machines ''/etc/defaultdomain'' should contains ''CCCHP''.


          For example:
3. Execute the domainname command to set the local NIS domain. For clon machines:
domainname CCCHP


# domainname classroom.Central.Sun.COM
4. Initialize the system as an NIS client by performing the command:
ypinit -c


  3. Create or populate the /etc/defaultdomain file with the domain name.
5. When the system prompts for a list of NIS servers, enter the NIS master host followed by the name of the local host and all other NIS slave servers on the local network. On 'clon00' it will be ''clon10'' and ''ccs10'', on 'clon10' it will be ''clon00'' and ''ccs10''.
  4. Initialize the system as an NIS client by performing the command:


# ypinit -c
??? 6. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file. If necessary, modify the file.


  5. When the system prompts for a list of NIS servers, enter the NIS master host followed by the name of the local host and all other NIS slave servers on the local network.
??? 7. On the NIS master, ensure that the ypserv process is running by performing the command (ask Computer Center to check 'ccs10' if necessary):
  6. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file. If necessary, modify the file.
  pgrep -fl ypserv
  7. On the NIS master, ensure that the ypserv process is running by performing the command:
If it is not running, contact Computer Center.


# pgrep -fl ypserv
8. Return to the proposed NIS slave system, and start the ypbind daemon:
svcadm enable svc:/network/nis/client:default


          If it is not running, refer to the previous section on how to start NIS daemons on the master.
9. Initialize the system as an NIS slave by performing the command:
ypinit -s master


  8. Return to the proposed NIS slave system, and enter the ypstart command to start the ypbind daemon.
where master is the name of the NIS master (ccs10 in our case).


# svcadm enable svc:/network/nis/client:default
  Note: If you did not add the name of the NIS slave server when you initially configured
  the NIS master server using the ypinit command,enter the ypinit -m command once more on
  the NIS master server. In the process of updating the NIS master, the script prompts you
  for confirmation when it is about to destroy the existing domain database. Confirm by entering y.


  9. Initialize the system as an NIS slave by performing the command:
10. Before starting the ypserv daemon on the slave server, stop the client with the command:


# ypinit -s master
  DO NOT DO IT !!! svcadm disable svc:/network/nis/client:default


          where master is the name of the NIS master.
11. When the NIS server is started, it also starts the ypbind client daemon.


      Note: If you did not add the name of the NIS slave server when you initially configured the NIS master server using the ypinit command, enter the ypinit -m command once more on the NIS master server. In the process of updating the NIS master, the script prompts you for confirmation when it is about to destroy the existing domain database. Confirm by entering y.
  svcadm enable svc:/network/nis/server:default
  10. Before starting the ypserv daemon on the slave server, stop the client with the command:


# svcadm disable svc:/network/nis/client:default
12. To test NIS client functionality on the newly configured NIS slave server, perform the command:


   11. When the NIS server is started, it also starts the ypbind client daemon.
   ypwhich -m


# svcadm enable svc:/network/nis/server:default
The output shows a list of maps together with the NIS master server for each map.
 
  12. To test NIS client functionality on the newly configured NIS slave server, perform the command:
 
# ypwhich -m
 
          The output shows a list of maps together with the NIS master server for each map.

Latest revision as of 15:59, 9 December 2008

CLON cluster has NIS slave servers to provide backup if the NIS master server becomes unavailable. To configure an NIS slave server, complete the following steps on the system that you want to designate as the slave server:

1. Edit the /etc/hosts file to ensure that the NIS master and all NIS slave servers have been defined. For example on clon00 two extra NIS servers must be specified:

 #
 # NIS servers
 #
 129.57.167.14  clon10.jlab.org  clon10
 129.57.33.22   ccs10.jlab.org   ccs10
 #

2. Create or populate the /etc/defaultdomain file with the domain name. For clon machines /etc/defaultdomain should contains CCCHP.

3. Execute the domainname command to set the local NIS domain. For clon machines:

domainname CCCHP

4. Initialize the system as an NIS client by performing the command:

ypinit -c

5. When the system prompts for a list of NIS servers, enter the NIS master host followed by the name of the local host and all other NIS slave servers on the local network. On 'clon00' it will be clon10 and ccs10, on 'clon10' it will be clon00 and ccs10.

??? 6. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file. If necessary, modify the file.

??? 7. On the NIS master, ensure that the ypserv process is running by performing the command (ask Computer Center to check 'ccs10' if necessary):

 pgrep -fl ypserv

If it is not running, contact Computer Center.

8. Return to the proposed NIS slave system, and start the ypbind daemon:

svcadm enable svc:/network/nis/client:default

9. Initialize the system as an NIS slave by performing the command:

ypinit -s master

where master is the name of the NIS master (ccs10 in our case).

 Note: If you did not add the name of the NIS slave server when you initially configured
 the NIS master server using the ypinit command,enter the ypinit -m command once more on
 the NIS master server. In the process of updating the NIS master, the script prompts you
 for confirmation when it is about to destroy the existing domain database. Confirm by entering y.

10. Before starting the ypserv daemon on the slave server, stop the client with the command:

 DO NOT DO IT !!! svcadm disable svc:/network/nis/client:default

11. When the NIS server is started, it also starts the ypbind client daemon.

 svcadm enable svc:/network/nis/server:default

12. To test NIS client functionality on the newly configured NIS slave server, perform the command:

 ypwhich -m

The output shows a list of maps together with the NIS master server for each map.