home *** CD-ROM | disk | FTP | other *** search
/ 3D Images / 3D Images.iso / programs / amiga / rayshade / inetray / install < prev    next >
Encoding:
Text File  |  1995-01-12  |  19.1 KB  |  449 lines

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