在ubuntu9.10上安裝完nis  server

#apt-get install nis

啟動時會出現


root@NIS:/etc# vi yp.conf
root@NIS:/etc# /etc/init.d/nis stop
 * Stopping NIS services                                                 [ OK ]
root@NIS:/etc# /etc/init.d/nis start
 * Starting NIS services                                                        


 * binding to YP server...                                                      

  * ....                                                                        

  * ....                                                                        

  * ....                                                                        

  * ....                                                                      

  * ....                                                                        

  * ....                                                                      

  * ....                                                                        

  * ....                                                                      

  * ....                                                                      

  * ....                                                                [fail]


                                                                         [ OK ]

 


請執行

/usr/lib/yp/ypinit -m


At this point, we have to construct a list of the hosts which will run NIS
servers.  NIS.tmu.edu.tw is in the list of NIS server hosts.  Please continue to add
the names for the other hosts, one per line.  When you are done with the
list, type a <control D>.
        next host to add:  NIS.tmu.edu.tw
        next host to add:
The current list of NIS servers looks like this:

NIS.tmu.edu.tw

Is this correct?  [y/n: y]  y
We need a few minutes to build the databases...
Building /var/yp/tmu.edu.tw/ypservers...
Running /var/yp/Makefile...
make[1]: Entering directory `/var/yp/tmu.edu.tw'
Updating passwd.byname...
Updating passwd.byuid...
Updating group.byname...
Updating group.bygid...
Updating hosts.byname...
Updating hosts.byaddr...
Updating rpc.byname...
Updating rpc.bynumber...
Updating services.byname...
Updating services.byservicename...
Updating netid.byname...
Updating protocols.bynumber...
Updating protocols.byname...
Updating netgroup...
Updating netgroup.byhost...
Updating netgroup.byuser...
Updating shadow.byname...
make[1]: Leaving directory `/var/yp/tmu.edu.tw'


NIS.tmu.edu.tw has been set up as a NIS master server.


Now you can run ypinit -s NIS.tmu.edu.tw on all slave server.

 


root@NIS:/etc# /etc/init.d/nis stop
 * Stopping NIS services                                                 [ OK ]
root@NIS:/etc# /etc/init.d/nis start
 * Starting NIS services                                                 [ OK ]

PERFECT!!

 


文章標籤
全站熱搜
創作者介紹
創作者 slinbody 的頭像
slinbody

495884965

slinbody 發表在 痞客邦 留言(1) 人氣(419)