admin.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Orion - Administration</title>
  5. <link rel="StyleSheet" href="doc.css" type="text/css" media="screen"/>
  6. <link rel="StyleSheet" href="docprint.css" type="text/css" media="print"/>
  7. <script type="text/javascript" src="../js/jquery.js"></script>
  8. <script type="text/javascript" src="../js/stripe.js"></script>
  9. </head>
  10. <body>
  11. <div id="page">
  12. <div id="menu">
  13. <ul>
  14. <li><a href="index.html">Index</a></li>
  15. <li>Installation and Administration</li>
  16. <li><a href="index.html#RunApplet"><b>Orion</b> as a Java Applet</a></li>
  17. <li><a href="index.html#RunApplication"><b>Orion</b> as a Java Application</a></li>
  18. <li><a href="keys.html">Key Mappings</a></li>
  19. <!--
  20. <li><a href="bugparade.html">Bug Parade</a></li>
  21. -->
  22. <li><a href="licenses.html">Licenses</a></li>
  23. </ul>
  24. </div>
  25. <div id="content">
  26. <h1>Orion - Administration</h1>
  27. <h2>Index</h2>
  28. <ul>
  29. <li><a href="#Installing">Installation</a></li>
  30. <li><a href="#TagsSetup">Setting up a tags file</a></li>
  31. <li><a href="#Config">Configuration</a></li>
  32. </ul>
  33. <h2 id="Installing">Installing Orion</h2>
  34. <div class="important">
  35. <b>Note:</b> This document is very out-of date and needs rewriting.
  36. </div>
  37. <p><span class="Orion">Orion</span> is distributed as a single file called
  38. <span class="fileref">orion.war</span>.
  39. This file cannot be used as is, and must have its contents extracted
  40. before <span class="Orion">Orion</span> can be used.</p>
  41. <p>To extract the required files, you must first decide upon a
  42. location for the <span class="Orion">Orion</span> distributed files.
  43. For example, installation could be into a directory called
  44. <span class="fileref">/home/orion</span>.</p>
  45. <p>This document will refer to this location as
  46. <a class="instdir">_INSTDIR_</a>.</p>
  47. <div class="important">
  48. <b>Note:</b> If you are planning to set up
  49. <span class="Orion">Orion</span> to be served by Jakarta Tomcat, you are
  50. best to install the product into you Tomcat installation.
  51. See <a href="#jakartaconf">here</a> for more information.
  52. </div>
  53. <p>The following commands should be issued:</p>
  54. <pre class="codesnippet">
  55. cd <a class="instdir">_INSTDIR_</a>
  56. jar -xvf orion_package.jar
  57. </pre>
  58. <p>This leads to the following files being extracted:</p>
  59. <pre class="codesnippet">
  60. index.html
  61. doc/index.html
  62. doc/admin.html
  63. doc/index.html
  64. doc/keys.html
  65. doc/style.html
  66. doc/bugparade.html
  67. doc/doc.css
  68. doc/docprint.css
  69. doc/images
  70. doc/images/orion3.jpg
  71. <span class="emphasis">lib/orion.jar</span>
  72. <span class="emphasis">lib/orionapplet.jar</span>
  73. <span class="emphasis">lib/oriontags.jar</span>
  74. <span class="emphasis">lib/orionservlet.jar</span>
  75. <span class="emphasis">WEB-INF/lib/orionservlet.jar</span>
  76. WEB-INF/lib/sample_web.xml
  77. </pre>
  78. <p>Of these files, it is <span class="fileref">orionXXX.jar</span> files
  79. that are crucial to Orion operation.
  80. These are the actual executable content of orion that allow all forms
  81. of orion execution.</p>
  82. <h2 id="TagsSetup">Setting up a tags file</h2>
  83. <p>A tags file is created using the <code>oriontags</code> program.
  84. This program is in the <span class="fileref">oriontags.jar</span> file.</p>
  85. <p>The usage of this is</p>
  86. <pre class="codesnippet">
  87. Usage: java -jar oriontags.jar -d &lt;srcdir&gt; &lt;outdbname&gt; [-x &lt;dir,dir...&gt;]
  88. </pre>
  89. <p>For example, to create a database for my MTP source tree I can use
  90. the command</p>
  91. <pre class="codesnippet">
  92. java oriontags -d e:\work\trans\5200\unikixsrc -f trans.tags
  93. </pre>
  94. <div class="important">
  95. <b>Note:</b> If there are a large number of files then Java can die
  96. with an out of memory error.
  97. This is the case when producing a tags file for the MTP source base.
  98. The solution is to add an extra flag on the command like this
  99. <pre class="codesnippet">
  100. java -mx64m -jar oriontags.jar -d e:\work\trans\5200\unikixsrc -f trans.tags</pre>
  101. </div>
  102. <p>When this command is run, it will produce a number of lines
  103. like:</p>
  104. <pre class="codesnippet">
  105. Parsing [1] e:\work\trans\5200\unikixsrc\admin\accounting\kixjas.c
  106. Parsing [2] e:\work\trans\5200\unikixsrc\admin\console\kixlog.c
  107. Parsing [3] e:\work\trans\5200\unikixsrc\admin\console\kxtrace_defines.h
  108. Parsing [4] e:\work\trans\5200\unikixsrc\admin\console\unikixprt.c
  109. Parsing [5] e:\work\trans\5200\unikixsrc\admin\include\kxcmn.h
  110. Parsing [6] e:\work\trans\5200\unikixsrc\admin\include\kxdummy.h
  111. Parsing [7] e:\work\trans\5200\unikixsrc\admin\include\kxerrmsg.h
  112. Parsing [8] e:\work\trans\5200\unikixsrc\admin\kixdump\kixabort.c
  113. Parsing [9] e:\work\trans\5200\unikixsrc\admin\kixdump\kixdump.c
  114. </pre>
  115. <p>and then finally it will produce a set of statistics.</p>
  116. <h2 id="Config">Configuring Orion</h2>
  117. <p>The configuration of <span class="Orion">Orion</span> depends entirely
  118. upon the mode of operation that you require.
  119. All modes of operation require a tags file to be available
  120. (<a href="#TagsSetup">see previous section</a>).</p>
  121. <h3 id="ConfigServlet">Servlet Configuration</h3>
  122. <p>The servlet version of <span class="Orion">Orion</span> can take 2 forms.
  123. The traditional form is higher functionality, but is more complex to
  124. configure.</p>
  125. <p>For both forms, there is a single Java servlet called
  126. <span class="fileref">orionservlet.class</span> that is contained in
  127. <span class="fileref">orion.jar</span>.
  128. For most Servlet environments, this is specified without the suffix
  129. as <span class="fileref">orionservlet</span>.</p>
  130. <h4>Traditional</h4>
  131. <p>When configuring the servlet, the following parameters are
  132. available:</p>
  133. <table cellspacing="0" summary="Configuration Parameters" class="ot striped">
  134. <thead>
  135. <tr>
  136. <th>Parameter</th>
  137. <th>Description</th>
  138. <th>Required?</th>
  139. </tr>
  140. </thead>
  141. <tbody>
  142. <tr>
  143. <td><code>cconfdir</code></td>
  144. <td>This is a full path specification of a directory that will be
  145. used by the servlet to store information pertenant to each
  146. client access.</td>
  147. <td>Yes</td>
  148. </tr>
  149. <tr>
  150. <td><code>database</code></td>
  151. <td>This is a full path specification of the Orion database
  152. file.</td>
  153. <td>Yes</td>
  154. </tr>
  155. <tr>
  156. <td><code>instdir</code></td>
  157. <td>This is the full path specification of the location of the
  158. Orion files.
  159. That is, the value of <a class="instdir">_INSTDIR_</a> as used
  160. in the '<a href="#Installing">Installing Orion</a>'
  161. section.</td>
  162. <td>Yes</td>
  163. </tr>
  164. <tr>
  165. <td><code>title</code></td>
  166. <td>The title to be placed on the Orion HTML page.</td>
  167. <td>No</td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. <h4>Example of setup for Apache JServ</h4>
  172. <p>The following is a snippet of an
  173. <a href="http://java.apache.org">Apache JServ</a> configuration to
  174. serve <span class="Orion">Orion</span>.</p>
  175. <pre class="codesnippet">
  176. servlet.jorion.initArgs=cconfdir=/home/orion/clientconfig
  177. servlet.jorion.initArgs=database=/home/orion/j7.tags
  178. servlet.jorion.initArgs=instdir=/home/orion/orion
  179. servlet.jorion.initArgs=title=Orion of JDK 1.7 Source
  180. </pre>
  181. <h4 id="jakartaconf">Example of setup for Apache Jakarta Tomcat</h4>
  182. <p><a href="http://jakarta.apache.org">Apache Tomcat</a> works with a
  183. fundamental concept of a Web Application (webapp).
  184. These web applications normally live under the <code>webapps</code>
  185. directory of a tomcat installation.</p>
  186. <p>It is recommended that you set up a separate web application for
  187. orion.
  188. This will ease maintenance for you, and provide isolation of function.</p>
  189. <p>The following discussion will use the symbol <code>$TOMCAT</code>
  190. to mean the directory into which you have installed tomcat.
  191. To create a web application for orion, you should do the following.</p>
  192. <ol>
  193. <li>Create the directory <code>$TOMCAT/webapps/orion</code>.
  194. This will be your <span class="Orion">Orion</span> web application.</li>
  195. <li>Create the directory <code>$TOMCAT/webapps/orion/WEB-INF</code>.</li>
  196. <li>Create a directory to store client configuration information.
  197. This can be anywhere, but it is recommended that you use a
  198. directory under the <code>$TOMCAT/webapps/orion/WEB-INF</code>
  199. directory.</li>
  200. <li>Extract the <span class="fileref">orion_package.jar</span> into this
  201. <code>WEB-INF</code> directory.</li>
  202. <li>Create the file
  203. <code>$TOMCAT/webapps/orion/WEB-INF/web.xml</code>.
  204. The contents of the file should be along the lines of the example
  205. below.
  206. You should ensure that the values you place in the fields are
  207. correct for your installation.
  208. It should be further noted that multiple orion instances can be
  209. specified in this piece of XML, and so this web application can be
  210. used for all of your orion requirements.</li>
  211. </ol>
  212. <pre class="codesnippet">
  213. &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  214. &lt;!DOCTYPE web-app
  215. PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  216. "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"&gt;
  217. &lt;web-app&gt;
  218. &lt;servlet&gt;
  219. &lt;servlet-name&gt;
  220. testorion
  221. &lt;/servlet-name&gt;
  222. &lt;servlet-class&gt;
  223. orionservlet
  224. &lt;/servlet-class&gt;
  225. &lt;init-param&gt;
  226. &lt;param-name&gt;database&lt;/param-name&gt;
  227. &lt;param-value&gt;<a class="emphasis">e:/work/code/fish.tags</a>&lt;/param-value&gt;
  228. &lt;/init-param&gt;
  229. &lt;init-param&gt;
  230. &lt;param-name&gt;cconfdir&lt;/param-name&gt;
  231. &lt;param-value&gt;e:/work/acs/conf&lt;/param-value&gt;
  232. &lt;/init-param&gt;
  233. &lt;init-param&gt;
  234. &lt;param-name&gt;instdir&lt;/param-name&gt;
  235. &lt;param-value&gt;<a class="emphasis">d:/lpp/jakarta-tomcat/webapps/orion/WEB-INF/lib</a>&lt;/param-value&gt;
  236. &lt;/init-param&gt;
  237. &lt;init-param&gt;
  238. &lt;param-name&gt;title&lt;/param-name&gt;
  239. &lt;param-value&gt;Testing Orion&lt;/param-value&gt;
  240. &lt;/init-param&gt;
  241. &lt;/servlet&gt;
  242. &lt;servlet-mapping&gt;
  243. &lt;servlet-name&gt;
  244. testorion
  245. &lt;/servlet-name&gt;
  246. &lt;url-pattern&gt;
  247. /test/*
  248. &lt;/url-pattern&gt;
  249. &lt;/servlet-mapping&gt;
  250. &lt;/web-app&gt;
  251. </pre>
  252. <h3 id="ConfigApplication">Application Configuration</h3>
  253. <p>The <span class="Orion">Orion</span> Application configuration is
  254. (at least initially) not pretty.
  255. Once the initial file is set up, however configuration is fine.
  256. <span class="note">This configuration will improve in subsequent
  257. versions.</span> </p>
  258. <p><span class="Orion">Orion</span> uses a configuration file that is
  259. located in your HOME directory.
  260. This directory can be difficult to determine, and indeed it changes
  261. depending on the version of Java you are using, on which platform.</p>
  262. <p>The easiest way to determine the location of the file is to try
  263. running <span class="Orion">Orion</span> without the file existing.
  264. You should then get an exception produced with a message something
  265. like </p>
  266. <pre class="codesnippet">
  267. java.lang.IllegalArgumentException: <a class="emphasis">D:\stevem.orion.properties</a>
  268. at uk.co.ruelgnoj.tools.orion.OrionConfig.&lt;init&gt;(OrionConfig.java:49)
  269. at uk.co.ruelgnoj.tools.orion.Orion.&lt;init&gt;(Orion.java:56)
  270. at uk.co.ruelgnoj.tools.orion.Orion.main(Orion.java:174)
  271. </pre>
  272. <p>The emphasised location is the name of the properties file which you must now produce.</p>
  273. <p>You should create the above named file, and put the single line in it</p>
  274. <pre class="codesnippet">
  275. orion.database=YOUR_TAGS_FILE
  276. </pre>
  277. <p>For example, my setting is</p>
  278. <pre class="codesnippet">
  279. orion.database=e:\\tags\\fish.tags
  280. </pre>
  281. <p>Note the tags file name needs to be a fully qualified path
  282. name, and on Windows platforms, each <code>\</code> needs to be
  283. doubled (as can be seen above).</p>
  284. <p>Configuration of the display colors, size, Font, etc can be done
  285. by using the Menu Items of <span class="Orion">Orion</span> itself.</p>
  286. </div>
  287. <div id="copyright">
  288. <p><a href="http://www.ruelgnoj.co.uk/">Copyright &#169; 1997,2017 by Steve Millington. All Rights Reserved.</a></p>
  289. </div>
  290. </div>
  291. </body>
  292. </html>