in order for NIS to operate sucessfully, we have to construct a list of the
NIS servers. Please continue to add the names for YP servers in order of
preference, one per line. When you are done with the list, type a
or a return on a line by itself.
next host to add: sun3
next host to add: sun4 加上备服务器sun4
next host to add: ^D
The current list of yp servers looks like this:
sun3
sun4
Is this correct? [y/n: y] y
Installing the YP database will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [y/n: n] y
The yp domain directory is /var/yp/testnis.com.cn
Can we destroy the existing /var/yp/testnis.com.cn and its contents? [y/n: n] y
There will be no further questions. The remainder of the procedure should take
5 to 10 minutes.
Building /var/yp/testnis.com.cn/ypservers...
Running /var/yp /Makefile...
updated passwd
updated group
updated hosts
updated ipnodes
updated ethers
updated networks
updated rpc
updated services
updated protocols
updated netgroup
updated bootparams
/var/yp/testnis.com.cn/mail.aliases: 3 aliases, longest 10 bytes, 52 bytes total
/usr/lib/netsvc/yp/mkalias /var/yp/`domainname`/mail.aliases /var/yp/`domainname`/mail.byaddr;
updated aliases
updated publickey
updated netid
/usr/sbin/makedbm /etc/netmasks /var/yp/`domainname`/netmasks.byaddr;
updated netmasks
updated timezone
updated auto.master
updated auto.home
updated auto.direct
updated auth_attr
updated exec_attr
updated prof_attr
updated user_attr
updated audit_user
sun3 has been set up as a yp master server without any errors.
If there are running slave yp servers, run yppush now for any data bases
which have been changed. If there are no running slaves, run ypinit on
those hosts which are to be slave servers.
#
6.
root@sun3#/usr/lib/netsvc/yp/ypstart
starting NIS (YP server) services: ypserv ypbind ypxfrd rpc.yppasswdd rpc.ypupdated done. /必须是五个进程都启动(如果主机混合大小写,这里就只能启动ypserv ypbind)
root@sun3#ypwhich -m
root@sun3#ypcat hosts
root@sun3#ypcat passwd
4.
root@sun4 # ypinit -c
In order for NIS to operate sucessfully, we have to construct a list of the
NIS servers. Please continue to add the names for YP servers in order of
preference, one per line. When you are done with the list, type a
or a return on a line by itself.
next host to add: sun3
next host to add: sun4
next host to add: ^D
The current list of yp servers looks like this:
6.
root@sun4 #ypinit -s sun3
Installing the YP database will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [y/n: n] y
The yp domain directory is /var/yp/testnis.com.cn
Can we destroy the existing /var/yp/testnis.com.cn and its contents? [y/n: n] y
There will be no further questions. The remainder of the procedure should take
a few minutes, to copy the data bases from sun3.
Transferring audit_user...
Transferring user_attr...
Transferring prof_attr...
Transferring exec_attr...
Transferring auth_attr...
Transferring auto.direct...
Transferring auto.home...
Transferring auto.master...
Transferring timezone.byname...
Transferring netmasks.byaddr...
Transferring netid.byname...
Transferring mail.byaddr...
Transferring mail.aliases...
Transferring bootparams...
Transferring netgroup.byhost...
Transferring netgroup.byuser...
Transferring netgroup...
Transferring protocols.byname...
Transferring protocols.bynumber...
Transferring services.byservicename...
Transferring services.byname...
Transferring rpc.bynumber...
Transferring networks.byaddr...
Transferring networks.byname...
Transferring ethers.byname...
Transferring ethers.byaddr...
Transferring ipnodes.byaddr...
Transferring publickey.byname...
Transferring ipnodes.byname...
Transferring hosts.byaddr...
Transferring hosts.byname...
Transferring group.bygid...
Transferring group.byname...
Transferring passwd.byuid...
Transferring passwd.byname...
Transferring ypservers...
4.
root@sun5# ypinit -c
In order for NIS to operate sucessfully, we have to construct a list of the
NIS servers. Please continue to add the names for YP servers in order of
preference, one per line. When you are done with the list, type a
or a return on a line by itself.
next host to add: sun3
next host to add: sun4
next host to add: ^D
The current list of yp servers looks like this: