ypserv.8yp

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 8YP 代码 · 共 243 行

8YP
243
字号
.\" SCCSID: @(#)ypserv.8yp	8.2	11/9/90.TH ypserv 8yp.SH Nameypserv, ypbind \- yellow pages (YP) server and binder processes.SH Syntax.B /usr/etc/ypserv.br.B /etc/ypbind [ \-S .I domainname, servername1,servername2...][.B \-X].SH Description.NXR "ypserv command".NXR "ypbind daemon".NXA "ypbind daemon" "ypwhich command".NXA "mount command (NFS)" "ypserv daemon".NXA "ypserv daemon" "yppush command".NXR "YP server".NXR "YP binder".PPThe yellow pages (YP) service provides a network lookup service  consisting of databases and processes.  The databases are.PN dbm(3x)files stored in the.PN  /etc/yp directory.These files are described in .MS ypfiles 5yp .The processes are .PN /usr/etc/ypserv ,the YP database lookup server, and .PN /etc/ypbind ,the YP binder.The software interface to the YP service is described in .MS ypclnt 3yp .Administrative tools are described in.MS yppush 8yp , .MS ypxfr 8yp , .MS yppoll 8yp , and .MS ypwhich 1yp .Tools to see the contents of YP maps are described in.MS ypcat 1yp , and .MS ypmatch 1yp .Database generation and maintenance tools are described in.MS ypmake 8yp , and .MS makedbm 8yp ..PPBoth.PN ypservand.PN ypbindare daemon processes activated at system startuptime from .PN /etc/rc.local .The.PN ypservcommand runs only on a YP server machine with a complete YP database.The.PN ypbindcommand runs on all machines using YP services, both YP servers and clients..PPThe.PN ypservdaemon's primary function is to look up information in its local database of YP maps.The operations performed by.PN ypserv are defined for the programmer in the header file .PN <rpcsvc/yp_prot.h> .  .PPCommunication with .PN ypservis by means of RPC calls.  Lookup functions are described in.MS ypclnt 3yp ,and are supplied as C-callable functions in .PN /lib/libc ..PPThere are four lookup functions, all of which are performed on a specified map within a YP domain:.PN Match , .PN Get_first ,.PN Get_next ,and.PN Get_all .The.PN Matchoperation takes a key, and returns the associated value.The.PN Get_firstoperation returns the first key-value pair from the map, andthe.PN Get_next operation returns the remaining key-value pairs.The.PN Get_all operation ships the entire map to the requester..PPTwo other functions supplyinformation about the map, rather than the map entries:.PN Get_order_number ,and .PN Get_master_name .Both the order number and the master name exist in the map askey-value pairs, but the server will not return either through theusual lookup functions.  If the map is examined with.MS makedbm 8yp ,however, they are visible..PPOther functions are used within the YPsubsystem itself, and are not of general interest to YP clients.  Theyinclude the.PN Do_you_serve_this_domain? ,the.PN Transfer_map ,and the.PN Reinitialize_internal_statefunctions..PPThe purpose of the.PN ypbindfunctionis to remember information that lets client processes on a single nodecommunicate with a.PN ypservprocess.The .PN ypbindfunction .I must  run on every machine that has YP client service requirements.The .PN ypbindfunction must be started through an entry in the .PN /etc/rc.local file. .PPThe information.PN ypbindremembers is called a .IR binding , the association of a domain name withthe internet address of the YP server, and the port on that host at which the.PN ypservprocess is listening for service requests.  The process of binding is drivenby client requests.  As a request for an unbound domain comes in, the.PN ypbindprocess broadcasts on the net trying to find a.PN ypservprocess that serves maps within that domain.  Since the binding is established by broadcasting, there must be at least one.PN ypservprocess on every net.  Once a domain is bound by a particular.PN ypbind ,that same binding is given to every client process on the node.The .PN ypbindprocess on the local node or a remote node may be queried for the binding of a particular domain by using the.MS ypwhich 1yp command..PPBindings are verified before they are given out to a client process.  If.PN ypbindis unable to speak to the.PN ypservprocess it is bound to, it marks the domain as unbound, tells the clientprocess that the domain is unbound, and tries to bind the domainonce again.  Requests received for an unbound domain will fail immediately.In general, a bound domain is marked as unbound when the noderunning .PN ypservcrashes or gets overloaded.  When the node gets overloaded, .PN ypbindwill try to bind any YP server (typically one that is less-heavily loaded) available on the net..PPThe.PN ypbindprocess also accepts requests to set its binding for a particulardomain.  The request is usually generated by the YP subsystem itself..SH Options.IP \-S 10Allows the system administrator to lock.PN ypbind to a particular domain and set of servers. Up to four servers can be specified as follows:.EX/etc/ypbind \-S domainname,server1,server2,server3,server4.EENote that there can not be any spaces around the commas inthe command line. The .PN \-Soption ensures that this system only binds to the specified domain and to one of the specified servers.The servers used with the .PN \-Soption must have entries in the local.PN /etc/hosts file..IP \-XThe initial bind (.PN \-X )option forces .PN ypbindto bind to a YP server at the time that the .PN ypbindcommand is executed, instead of waiting until YP is used.If no server is available at this time, .PN ypbindwill try for several minutes and then exit.Normally, .PN ypbindis executed at boot time..IPThe .PN \-Xoption enables a system that does not exclusively dependon YP to boot and to allow logins when there are no YPservers available.  Without this option, such a system hangs..SH FilesIf the file.PN /var/yp/ypserv.logexists when .PN ypservstarts up, log information is written to.PN ypserv.logwhen error conditions occur..SH See Alsoypcat(1yp), ypmatch(1yp), ypwhich(1yp), ypclnt(3yp), ypfiles(5yp), yppush(8yp),ypxfr(8yp).br\fIGuide to the Yellow Pages Service\fP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?