home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / inetray / install < prev    next >
Encoding:
Text File  |  1992-07-03  |  17.6 KB  |  415 lines

  1. ======================================================================
  2.                     I N S T A L L 
  3.                     doc: Fri Mar  6 15:32:06 1992
  4.                     dlm: Fri Jul  3 13:52:57 1992
  5.                     (c) 1992 ant@sitter
  6.                     uE-Info: 310 53 T 0 0 72 3 2 8 ofnI
  7. ======================================================================
  8.  
  9. I. Compilation
  10. ==============
  11. In order to compile inetray on your machines you first need to edit a
  12. couple of files.
  13.  
  14. prognum.h: Usually you should not need to edit this file!
  15.        In this file, the program numbers for the RPC-servers are
  16.        stored. Note that you should only edit this file if some of
  17.        the program numbers are already in use on your machine. Note
  18.        also, that if you edit this file, you have to run rpcgen
  19.        again to generate a number of source files (to do this, just
  20.        ``make rpcgen''). 
  21.        Note that if you want to have n servers running on one
  22.        machine, they take the program numbers IRNUM to IRNUM+n-1.
  23.  
  24. config.h: Very probably you would change here only the RESULTPORT
  25.       definition. Find a free port on the machines you want to run
  26.       the dispatcher (inetray) from and enter its number.
  27.       You might also want to change the timeout values (all in
  28.       seconds) and/or the nice value for the workers. On slow
  29.       machines you'll probably have to change the following timeouts:
  30.           RTIMEOUT:   time to wait for the next machine to register
  31.           CHKCLNT:    time between checks for inetray
  32.           STARTDELAY: time to give inetray.start to start servers
  33.       The default settings in config.h will, however, probably work
  34.       on many machines.
  35.  
  36. Makefile: Now you need to edit the Makefile. Note that you'll only have
  37.       to change stuff in the Tweakables section of the Makefile.
  38.       Most of the things you must define here you can extract from
  39.       the Makefiles of rayshade.
  40.  
  41.       CCFLAGS  : c compiler flags such as optimization, ...
  42.       LIBSHADE : complete path of the libshade.a library
  43.       INCSHADE : directory where the libshade includes reside
  44.                Note: -I must be specified
  45.       LIBRAY   : complete path of the libray.a library
  46.       INCRAY   : directories where the libshade includes reside
  47.                Note: this usually includes the rayshade main dir
  48.       LIBURT   : complete path of the librle.a library
  49.       INCURT   : directory where the liburt includes reside
  50.       LIBRPC   : library where the SUN-RPC and XDR routines are to be
  51.                found. If you don't know where you should probably
  52.              grep for xdr_int in /usr/lib or wherever your
  53.              libraries may be.
  54.       INCRPC   : If you compile Inetray with a non-default LIBRPC
  55.              (i.e. one you compiled yourself), you'll 
  56.              need a non-default set of h-files to include
  57.              (matching version).
  58.              !!! NOTE: YOU NEED TO SET incrpc TO THE PARENT
  59.                  DIRECTORY OF THE DIRECTORY WHERE THE H-FILES
  60.               ACTUALLY ARE LOCATED !!!
  61.               Note that with the current version you also need to 
  62.              define a var here which defines the wordlength of
  63.              your machine. See SUPPORT for values for specific
  64.              machines.
  65.       LIBDRAND : If you have to compile rayshade with a drand
  66.              library, you should also define it here.
  67.       SPAIR    : On most machines this should be empty. On A/UX,
  68.                however, the built in socketpair() does not seem to
  69.              work. If you compiled it and get socketpair()
  70.               errors, try to add socketpair.o here.
  71.       INSTDIR  : directory to install the executables to
  72.       INSTUSER : user to install the executables under
  73.       INSTGROUP: group to install ...
  74.       INSTMODE : mode to install ...
  75.       QUIRKS   : I tried to avoid that, but there seem to be
  76.              operating systems quirks around which have to be
  77.              taken care of. The only quirk available -s
  78.               D_AUX_QUIRK which makes inetray.start not
  79.              disaccociate from its tty so that the stderr to
  80.              syslog redirection works.
  81.  
  82.       Now you should be able to compile inetray. A short description
  83.       of the available target follows:
  84.  
  85.       all:        compiles everything (default target)
  86.       server:   compiles only rpc.inetrayd, inetray.start, inetray.relay
  87.       client:   compiles only inetray, inetray.kill, inetray.ping,
  88.                 rpc.dereg
  89.       rpcgen:   runs rpcgen to remake some source files. Note that
  90.             you must run this if you changed prognum.h or any .x
  91.             file. Note also that not every rpcgen has all the
  92.             options to work correctly; older ones usually lack
  93.             the -I option.
  94.       install:  installs the executables. Usually you should be root
  95.               to do that.
  96.       bak:        makes a bak directory and opies everything important
  97.               there
  98.       old:        makes a copy of the old version (for patch)
  99.       tar:        makes the distribution tar
  100.       ftp:        installs it to public ftp
  101.       patch:    makes and checks a patch (patchX)
  102.       Patch:    same, but includes Makefile in patchX
  103.       clean:    cleans temp compilation files & executables
  104.       spotless: cleans all executables and rpcgen generated files.
  105.  
  106.       Additionally there is a target for every executable.
  107.       Furthermore, there is a rule for making .rle from .ray files.
  108.  
  109. First Test
  110. ----------
  111. To run the first test it is assumed that you successfully compiled the
  112. following executables: inetray.start inetray.ping rpc.inetrayd. They
  113. should reside in the current directory.
  114.  
  115. % inetray.start rpc.inetrayd
  116.  
  117. After that you should have an entry for the inetray.start in the map
  118. handled by your local portmapper. You can check that with the rpcinfo
  119. command.
  120.  
  121. % inetray.ping
  122.  
  123. This should give you a list of answering machines after a few seconds. 
  124. If your machine answered, everything's fine and you can continue your
  125. installation.
  126. NOTE: If you get something like ``Pinging... [startSegmentation fault''
  127.       then you've very probably got an old version of RPC (where you
  128.       cannot give a NULL pointer as the function to call on
  129.       clnt_broadcast()). Compile at least version 4.0 and retry!
  130.  
  131. II. Installation
  132. ================
  133.  
  134. Basic Installation
  135. ------------------
  136. The basic installation is extremely simple: you just start up one
  137. inetray.start on every machine you want to have servers running. It
  138. takes one parameter, the full path of rpc.inetrayd. If you can, you
  139. should start it as root, since then the workers will run under the same
  140. user id as the dispatcher. Note that inetray and inetray.ping give back
  141. the username as who the servers are running.
  142. Note that there are a number of cases where the basic installation does
  143. not work and/or is not sufficient. These cases are described below.
  144.  
  145. ~/.inetrayrc
  146. ------------
  147. Most advanced installations requires the user to have a .inetrayrc in
  148. the current directory or in his home. This file is kept user-local since
  149. not every user might have access to the same machines.
  150. An exact description of the syntax of this file is given in Appendix B.
  151.  
  152. Using a single Machine not on the local network
  153. -----------------------------------------------
  154. To do this you add the following line to your .inetrayrc file:
  155.     ``use: <machinename>''
  156. If you want to find out what machines are on your local network you
  157. should issue a ping command with the broadcast address of your local
  158. network (usually, if your machine has the number a.b.c.d, the broadcast
  159. address is a.b.c.0). You may have to specify an option for ping to be
  160. able to do so (i.e. on SUNOS you have to write ``ping -s a.b.c.0'').
  161. Note: usually, you supply another user id under which you want the
  162.       workers to run on the remote machine. To do this you add the
  163.       Option UID=<number> (see below).
  164.  
  165. Using many machines on one remote local network
  166. -----------------------------------------------
  167. A remote local network is a lokal network to which the machine you are
  168. starting inetray from is not directly connected. To add such a network
  169. you add the following line to your .inetrayrc file:
  170.     ``use: <directed broadcast address>''
  171. To find out the directed broadcast address(es) of a machine, run
  172. netinfo (supplied with inetray). Any broadcast address returned by
  173. netinfo should work if everything is installed correctly. Note that if
  174. a machine listens to 2 different broadcast and/or local addresses (i.e.
  175. has 2 interfaces), it is a gateway. 
  176. Note: usually, you supply another user id under which you want the
  177.       workers to run on the remote machines. To do this you add the
  178.       Option UID=<number> (see below).
  179.  
  180. Running Multiple Workers on a Machine (Network)
  181. -----------------------------------------------
  182. To do this, you just add the option N=<Number> to your Use List-Entry.
  183. Example:
  184.     ``use: multiHost N=16, myHost''
  185. This line makes inetray start 16 workers on host ``multiHost'' but only
  186. one worker on ``myHost''. You can also supply the option to a network
  187. entry (if you are lucky enough to have a network full of machines with
  188. more than one processor).
  189. Note: The above line even works if multiHost is on the local network
  190.       since parameters for single machines precede the ones for whole
  191.       networks.
  192.  
  193. Running workers under a different uid on a Machine (Network)
  194. ------------------------------------------------------------
  195. To do this, you just add the option UID=<number> to your Use List-Entry.
  196. Note that this only has any effect if inetray.start was started as root
  197. (or you used the inetd-installation described below).
  198.  
  199. Excluding the Local Network
  200. ---------------------------
  201. Sometimes it may be advisable not to use any machines on the local
  202. network. To do this, you just add
  203.     ``use: local N=0''
  204. to your .inetrayrc. Note that local is a reserved word, no machine must
  205. be called ``local''. You can also have something like
  206.     ``use: local UID=56''
  207. if you want all inetray workers run under a special user id on the local
  208. network. 
  209.  
  210. Installing Servers with Inetd
  211. -----------------------------
  212. This is very simple but you must be root to do it. If you do it you
  213. won't have to have an inetray.start running on the machine. You also
  214. won't be able to have multiple workers running on that machine. On the
  215. machines, you want to install inetray like that you add the following
  216. line to inetd.conf:
  217.   ``555555555/1 dgram rpc/udp wait root <path>/rpc.inetrayd rpc.inetrayd''
  218.  
  219.   
  220. III. Example Installation
  221. =========================
  222. This is (more or less) the actual installation on which inetray was
  223. developped. First follows the description of the basic installation
  224. (accessible by all users with accounts on the machines mentioned below).
  225.  
  226. Local Network:
  227.     SUN4s:    sitter, julia, orinoco, tiber, yukon
  228.     SUN3s:    various
  229.     SGIs:    plessur (2 processors), saane, glatt
  230. Notes:
  231.     - The SUN3s should not be used for traceing due to the huge
  232.       difference in speed
  233.     - yukon usually heavily loaded and should not be used
  234.     - All machines know the same users and have (mostly) the same
  235.       filesystems mounted
  236.  
  237. Server Installation:
  238.     - On all machines except plessur inetd.conf has been changed to
  239.       start    rpc.inetrayd by inetd.
  240.     - plessur needs to have an inetray.start running to allow 2
  241.       server to be running there. (inetray.start is started at
  242.       boottime as root).
  243.  
  244. ~/.inetrayrc:
  245.     ignore: yukon
  246.     use: plessur N=2
  247.  
  248. There is a user, let's call him ant (uid 819), who has a number of
  249. accounts on different machines. He has no root access on any of these
  250. machines. His specific installation follows:
  251.  
  252. Accounts:
  253.     bernina (4 processor DECstation)    uid = 1211
  254.     kyu1    (MAC II running A/UX)        uid = 1011
  255.     c11-c99    (SUN3s on another local net)    uid = 1980
  256.  
  257. Server Installation:
  258.     - On all machines he executes ``inetray.start rpc.inetrayd''
  259.  
  260. ~/.inetrayrc (on the local network):
  261.     ignore: yukon
  262.     use: plessur N=2
  263.     use: bernina N=4 UID=1211
  264.     use: 129.132.13.0 UID=1980, kyu1 UID=1011
  265.  
  266. ~/.inetrayrc (on bernina):
  267.     ignore: yukon
  268.     use: local N=4                                               
  269.     use: 129.132.13.0 UID=1980, kyu1 UID=1001
  270.     use: 129.132.17.0 UID=819, plessur N=2 UID=819
  271.  
  272. Notes:
  273.     - The machine c13 has inet# 129.132.17.33, therefore the directed
  274.       broadcast address for the c?? machines is 129.132.13.0
  275.     - Although kyu1 is really on the same local network as the c??
  276.       machines, its parameters take precedence 
  277.     - Actually, the userids in ~/.inetrayrc are not really necessary
  278.       since the programs will run under that user anyway. Note,
  279.       however that it is a good idea always to supply the user id
  280.       for clarity
  281.     - Since the filesystems are different on those machines, the
  282.       .ray files have to be transferred before traceing. User ant
  283.       usually have a directory ~/trabajo/inetray on all machines
  284.  
  285. Appendix A: Compiling librpclib.a (4.0)
  286. =======================================
  287. On some machines, there are only old/partial implementations of the SUN
  288. RPC library (librpclib.a) e.g. Apple (AUX), DECstations (Ultrix 4.0). On
  289. these machines, librpclib.a has to be compiled. On all machines I've
  290. been doing that I had very few problems.
  291. The only tricky part is the XDR implementation for machines with a
  292. different representation of floats/doubles (different from IEEE and/or
  293. different byte order from SPARC/68000). Fortunately, on many of those
  294. machies (e.g. DECstations) there is already an xdr implementation (on
  295. the DECstations it is in libc.a). Therefore, xdr doesn't have to be
  296. recompiled - it is sufficient to comment out all *xdr* files from the
  297. Makefile.
  298. Usual changes include:
  299.     Makefile: Add a CFLAG, something like -Dmc68000 or -Dsparc, ...
  300.           Reason: in auth.h there is a typedef for a 32bit
  301.                      unsigned integer which is dependent on the
  302.               machine.
  303.           Comment out all *xdr* files
  304.           Reason: See above
  305.     netdb.h: Comment out the definition of struct rpcent
  306.          Reason: This usually is already defined int
  307.               /usr/include/netdb.h.
  308.     types.h: Comment out the definition of MAXHOSTNAMELEN (or at
  309.          least check if it is consistent with the system defined
  310.          value (normally in <sys/params.h>)).
  311.     various files: Add #include where needed.
  312.                Reason: not on all systems everything includes
  313.                           the same sub-includes.
  314. Note that if you use a non-default librpclib.a you HAVE to set INCRPC in
  315. the Makefile since you have to supply a new default path for all the
  316. rpc-specific includes!
  317. IMPORTANT: If you get warnings when compiling librpclib.a and/or
  318.        Inetray concerning the redefinition of some symbols (like
  319.        MAXHOSTNAMELEN in <sys/params.h>, you MUST exclude these
  320.        symbols from the rpc h-files (in the example mentioned, it is
  321.        in types.h)!
  322.  
  323. Appendix B: The .inetrayrc Syntax
  324. =================================
  325. A .inetrayrc in the current directory takes precedence over the one in
  326. the home directory to allow a different setup for a special raytracing
  327. session (especially changes to the timeout and/or machines accessed).
  328. Empty lines and comments starting with # are allowed in this file (check
  329. the default file for details). It contains a nuber of option lists.
  330. Every option list starts with a keyword followed by a colon. After that
  331. a comma separated list of items follows. Note that a list must not
  332. encompass more than one line. Keywords can be repeated.
  333. The following keywords are available:
  334.  
  335.     resultport: port#
  336.                 Port number on which results are sent back.
  337.                         This overrides RESULTPORT in config.h.
  338.                         
  339.     timeout: time
  340.                 Timeout in seconds when registering workers.
  341.                         This overrides RTIMEOUT in config.h.
  342.                         
  343.     minworkers: number
  344.                 When registering workers, the timeout is ignored
  345.                         until at least this number of workers have
  346.                         registered.
  347.                         
  348.     maxworkers: number
  349.                 Only so many workers are considered. All
  350.             further answers are ignored automatically.
  351.  
  352.     blocksperserver: number
  353.                 See POO/Work Scheduling for details.
  354.  
  355.     minblocksize: number
  356.                 Minimun number of lines per block used by
  357.             scheduler. See POO/Work Scheduling for details.
  358.             Note that the last block may be smaller.
  359.  
  360.     maxblocksize: number
  361.                 Maximum number of lines per block used by
  362.             scheduler. See POO/Work Scheduling for details.
  363.             
  364.     ignore: hostname {, hostname}
  365.                 List of machines to ignore. If you don't want to
  366.             trace on a specific machine, just add it to this
  367.             list. The names of the hosts given here must
  368.             match exactly the names returned by
  369.             inetray.ping. This list allows specific hosts
  370.             from a network to be ignored which would
  371.             otherwise react to a broadcast. Note that simply
  372.             having ``use: name n=0'' would not work since
  373.             this only means that this machine will not be
  374.             called directly, it does not effect broadcasts.
  375.  
  376.     use: Use-List
  377.             List of machines and networks to use in trace.
  378.             See below.
  379.  
  380. The Use List
  381. ------------
  382. The Use List is probably the most important part of the installation. It
  383. is used both after the use: keyword in .inetrayrc and as a list of
  384. parameters for inetray.ping. 
  385.  
  386. Formally, the Use List looks like this (EBNF):
  387.     "UseList" ::= "ListElt" {, "ListElt"}
  388.     "ListElt" ::= "Address" "Option" {"Option"}
  389.     "Address" ::= local |
  390.               "Letter"{"Char"} |
  391.               "Number"."Number"."Number"."Number"
  392.     "Option"  ::= N= "Number" | UID= "Number"
  393.  
  394. The Use List defines internally 3 data structures:
  395.     - a list of hosts (with parameters) given as their names
  396.     - a list of nets (with parameters) given as their inet numbers
  397.     - local parameters given after the reserved hostname local
  398.  
  399. Whenever inetray or inetray.ping is run they call the hosts according to
  400. the use list in the above sequence. This means that the parameters for a
  401. host on a net precede the parameters for the net (if both are present).
  402.  
  403. Both options have defaults, N= defaults to 1 and UID= defaults to the
  404. return value of geteuid(). The local parameters usually default as
  405. expected, except when you call inetray.ping with at least one parameter;
  406. then, local defaults to N=0 (so that you really ping only the machines
  407. specified and not also the ones reachable by broadcast from the current
  408. machine.
  409.  
  410. Note that you can give the machine number instead of its name; this is
  411. discouraged, however, since it is then internally treated like a
  412. network. 
  413.     
  414.  
  415.