Configure NIS Slave Server
login as root.
1. domainname example-domain
"example-domain" is the domainname. It must be the same domainname as you have in NIS master.
2. Populate the /etc/defaultdomain file with the domainname.
domainname > /etc/defaultdomain
3. Edit the /etc/hosts file to ensure that the NIS master and all NIS slave servers have been defined.
4. cp /etc/nsswitch.nis /etc/nsswitch.conf
Edit /etc/nsswitch.conf as necessary (ie. add dns entry).
5. /usr/sbin/ypinit -c
Above command initialize the slave server as a client first.
The "ypinit" command prompts you for a list of NIS servers. Enter the name of the local slave you are working on first, then the master server, followed by the other NIS servers in your domain in order from the physically closest to the furthermost (in network team), then press CTRL-D.
6. Make sure "ypbind" is not running.
ps -ef | grep ypbind
7. Start ypbind.
/usr/lib/netsvc/yp/ypstart
8. Initialize this machine as a slave and transfer the NIS maps.
/usr/sbin/ypinit -s master_machine_name
9. Stop ypbind.
/usr/lib/netsvc/yp/ypstop
10. Start ypbind and ypserv.
/usr/lib/netsvc/yp/ypstart
Configure NIS Client
login as root
domainname > /etc/defaultdomain
cp /etc/nsswitch.nis /etc/nsswitch.conf
Edit /etc/nsswitch.conf as necessary (ie. add dns entry)
/usr/sbin/ypinit -c
You will be asked to name NIS servers from which the client may obtain name service information. You may list as many master or slave servers as youwant. The servers that you list can be located anywhere in the domain. It is good practice to first list the servers closest (in net terms) to the machine,then those that are on more distant parts of the net, then press CTRL-D.
Start the YP service
/usr/lib/netsvc/yp/ypstart
Sunday, April 13, 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment