File: INSTALL

package info (click to toggle)
jserv 1.1-3
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 4,616 kB
  • ctags: 3,003
  • sloc: sh: 7,718; java: 6,652; ansic: 4,755; makefile: 816; perl: 39; xml: 32
file content (359 lines) | stat: -rw-r--r-- 13,295 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

   +-------------------------------------------------------------------+
   | A P A C H E   J S E R V   I N S T A L L A T I O N   O N   U N I X |
   +-------------------------------------------------------------------+


  Introduction
  ============

  This file guides you through the installation process for UNIX systems.

  NOTE: Win32 users are highly recommended to use the self-installing 
  distribution (the "exe" distribution) or read the instructions 
  in the docs/install/ directory.


  Installing the Apache JServ servlet engine
  ==========================================

  1. Requirements
     ------------

     The following requirements exist for building Apache JServ:

     o  Disk Space: 
     
        The complete Apache JServ installation requires less than 2Mb of 
        hard disk space. The compiled, not-compressed jar archive is more or
        less 100Kb.

     o  Apache HTTP Server:
    
        We have removed all support for Apache 1.2.x. Apache 1.3.9 and 
        higher is the current supported version. Apache 1.3.9 has 
        been out for quite some time now and we feel that it is best that 
        you always upgrade to the latest version of Apache. We also had 
        several bugs as a result of bugs in Apache 1.2.x that have been 
        resolved in Apache 1.3.9.

     o  Java Runtime Environment:
  
        A fully compliant Java 1.1 Runtime Environment is required for Apache 
        JServ to execute. 
  
        The official list of compatible ports is found on the Sun Java 
        web site:

        <http://java.sun.com/cgi-bin/java-ports.cgi>
  
        The list of supported platforms and Java ports may be found in the 
        documentation (docs/support.html).
  
        NOTE: since Apache JServ uses _only_ standard Java APIs (java.*),       
        please, do not submit a bug report if your Java virtual machine fails 
        to execute Apache JServ because of broken compliance. Send the 
        bug report to your Java virtual machine implementors instead.
  
     o  Java Servlet Development Kit 2.0:
  
        The Sun Java JSDK 2.0 is required by Apache JServ for proper servlet 
        execution.  This package is freely available from the Sun Java web 
        site: 

        <http://java.sun.com/products/servlet/index.html>
        <http://java.sun.com/products/servlet/download.html>

        NOTE: this version of Apache JServ requires _EXACTLY_ the 2.0
        version of the JSDK in order to operate properly. Any other version
        (past, present or future and including the version that comes 
        with the Java Server Pages (JSP) jar file) is not supported.
        
     o  Java Compiler:
  
        Since most distributions include the precompiled Java binary archive,
        compilation of the Java source is optional.
        
        A list of supported Java compilers and virtual machines may be found 
        in the documentation (docs/support.html)
        
        NOTE: to build servlets, a Java compiler is needed. The Jikes compiler
        from IBM is a fast and easy to use replacement for Sun's slower javac 
        compiler. <http://www.alphaworks.ibm.com/tech/jikes>

     o  ANSI-C Compiler: 

        Make sure you have an ANSI-C compiler installed and relative Make 
        tools. The GNU C compiler (GCC version 2.7.2 is fine) or the EGCS C 
        compiler (the future of the GCC compiler) and GNU Make 
        (make preferably version 3.75) from the Free Software Foundation (FSF) 
        is recommended. If you don't have GCC then at least make sure your
        vendors compiler is ANSI compliant. You can find the homepage of GNU
        at <http://www.gnu.org/> and the GCC distribution under
        <http://www.gnu.org/order/ftp.html>. EGCS is available from 
        <http://egcs.cygnus.com/>.

     o  Dynamic Shared Object (DSO) support [OPTIONAL]:

        See your Apache documentation for more information on how to add
        DSO support and if your system is supported. You will need to make 
        sure that Perl 5.004 or later is installed in order to build DSO 
        modules because of the dependency on the Apache apxs module. 
        <http://www.perl.com/>


  2. Choose how to add the Apache JServ module to Apache
     ---------------------------------------------------

  There are two choices:
    
     o  Compile it in -  This requires that you have a source distribution 
        of the Apache server handy as it adds our source to that tree and 
        lets Apache build the Apache JServ module into itself statically.    
 
     o  DSO - This requires that you have an installation of Apache 1.3.9 
        or higher that was configured to have DSO support when it was 
        built.  If you are not sure whether your server has DSO support, 
        follow the instructions on configuring Apache JServ for DSO and the 
        configure script will tell you.


  3. Configure Apache First - IMPORTANT
     ----------------------------------

  If you are using a source distribution then you have to configure Apache
  first (some generated header files are needed for Apache JServ to pass its
  configure checks).  You do not need to worry about specifying the 
  Apache JServ module for this first run.

  Thus, a first time configure line to build a static version of Apache
  would look like this:

  ./configure \
       --prefix=/usr/local/apache
  make install

  If you are using DSO then you can ignore this step.  If you have a source
  distribution and would like to build it with DSO support and install it
  for use by Apache JServ then use the following options when configuring
  Apache:

     --enable-rule=SHARED_CORE --enable-module=so
     
  Thus, a first time configure line to build a DSO version of Apache
  would look like this:

  ./configure \
       --prefix=/usr/local/apache \
       --enable-rule=SHARED_CORE \
       --enable-module=so
  make install


  4. Configure Apache JServ
     ----------------------

  Now you are ready to configure Apache JServ.  To do this you may (or may not)
  need to specify quite a few arguments to configure.  The options to 
  pass to Apache JServ's configure are described below with complete 
  examples at the very bottom of this section.

  o  Apache Directory

     For DSO use:

       --with-apxs=/path/to/apache/installation/bin/apxs

     NOTE: The configure script will check a the default installation
     directory, /usr/local/apache. If you have Apache already installed 
     in there, you may leave this argument out.

     For a static compile use:

       --with-apache-src=/path/to/apache/source

     This is the path to the top level Apache directory from the source  
     distribution. In other words, this should point to the directory 
     that *contains* the src directory.

     NOTE: Do not try to use both --with-apxs and --with-apache-src 
     options at the same time. Also, Apache JServ 1.0, used 
     --with-apache-install. This has been deprecated and you should now use 
     --with-apxs instead.

  o  Prefix Path

     'make install' will copy the documentation and Apache JServ .jar file 
     into the directory that you specify with this option:

       --prefix=/usr/local/jserv

     The default value for this option is /usr/local/jserv

  o  JDK programs (java, javac, javadoc and jar)

     By default configure will first look at the JDK_HOME and JAVA_HOME 
     environment variables, if they aren't set then configure will check 
     your PATH environment variable. The results from using the PATH can 
     be overriden by:

       --with-jdk-home=/path/to/jdk

     If they are not found, configure will tell you and default back to 
     whatever is in your PATH.

     It is also possible to specify the locations of the java binaries 
     and force Java 2 usage with the following options:

       --with-java-platform=1 or 2 (generally no need to specify this)
       --with-java=/path/to/binary/java
       --with-javac=/path/to/binary/javac
       --with-javadoc=/path/to/binary/javadoc
       --with-jar=/path/to/binary/jar

     NOTE: By default, debugging symbols are left out of the Apache JServ 
     classes, you can put them back in by using this option:

       --enable-debugging

     NOTE: By default the jar file is not compressed, this can be 
     changed like so:
 
       --enable-compressed-jar

  o  JSDK classes

     Apache JServ needs to know where your servlet classes are.
     You will need to specify them like so:

       --with-JSDK=/path/to/jsdk.jar
          or
       --with-JSDK=/path/to/unpacked/jsdk

  o  Support for EAPI (mod_ssl)

     If you are using mod_ssl, then you should enable EAPI support by 
     adding:

       --enable-EAPI


  An example configure line for STATIC compilation is:
  
        ./configure \
                --prefix=/usr/local/jserv \
                --with-apache-src=/usr/local/apache/source \
                --with-jdk-home=/path/to/jdk \
                --with-JSDK=/path/to/jsdk.jar \
                --disable-debugging

  An example configure line for DSO compilation is:
  
        ./configure \
                --prefix=/usr/local/jserv \
                --with-apxs=/usr/local/apache/bin/apxs \
                --with-jdk-home=/path/to/jdk \
                --with-JSDK=/path/to/jsdk.jar \
                --disable-debugging


  5. Build Apache and Apache JServ
     -----------------------------

  Once you have configured Apache JServ you can run make. 

  Run 'make install' to make a .jar file, and copy it and the docs into 
  the directory you specified as --prefix. If you are building the DSO 
  version, this will compile the shared object. If you are building the 
  static version, this will just build the Java classes.

  If you are using an Apache source distribution then you also have 
  to run 'make install' in the Apache source directory to build Apache 
  with Apache JServ support in it. To do this, you will need to add the 
  following line to the static configure line in section 3 above:

    --activate-module=src/modules/jserv/libjserv.a

  This is an example of building a default Apache installation with 
  Apache JServ support added:

    ./configure \
        --prefix=/usr/local/apache
        --activate-module=src/modules/jserv/libjserv.a
    make
    make install

  You can see if Apache has loaded the mod_jserv module by executing 
  '/path/to/apache/installation/bin/httpd -l'.
  

  6. Configuration Files
     -------------------

  At this point, you must configure the Apache JServ directives for Apache. 
  There are example configuration files in the conf and example directories 
  that come with the Apache JServ package that help with this process. The 
  files in the example directory will help you configure a default zone 
  named "example" so that your URL's will look like this:
  
  <http://www.yourserver.com/example/Hello>

  There are three different types of configuration files for Apache JServ, 
  the first one should be included in your httpd.conf file with the Apache 
  "Include" directive. For example, in your httpd.conf file, you should have 
  a line like this: "Include /path/to/jserv.conf". 
  
  Within your "jserv.conf" file, there is a line that gives the path to the 
  second type of configuration file, the "jserv.properties" file. The line 
  in the jserv.conf file looks like this: "ApJServProperties 
  /path/to/jserv.properties".
  
  Lastly, within the "jserv.properties" file is a line that points to your 
  zone configuration file. If you have a zone called "example", then you 
  will need to have an "example.properties" file and the location to this 
  file is then defined with this line in your "jserv.properties" file: 
  "example.properties=/path/to/file/example.properties"

  Thus, the configuration file path looks like this:

  "->" sounds like "points to"

  httpd.conf -> jserv.conf -> jserv.properties -> example.properties
  
  You should make sure to edit all of these files and fill in the 
  appropriate information according to the comments provided in each of the 
  files. If you have questions about the definitions, you should consult 
  section 8 below, the documentation in the docs directory, on the 
  website, FAQ-O-Matic and/or the Java Apache Users mailing list.

  <http://java.apache.org/jserv/>
  <http://java.apache.org/faq/>
  <http://java.apache.org/main/mail.html>

  7. Problems
     --------

  First, look in the various log files for errors. If you are not getting 
  log files created, then this is generally a result of incorrect 
  permissions on the log files. Make sure that the user (ie: nobody) that 
  the Apache httpd is running as can write to the log files.

  Next, read the FAQ-O-Matic and documentation to see if your issues  
  have already been covered (there is a good chance that they have been). 
  
  <http://java.apache.org/faq/>
  
  Configuration errors and questions are not considered bugs and those 
  should be directed to the Java Apache Users mailing list.

  <http://java.apache.org/main/mail.html>

  If think that you have found a bug, please report it to the Apache Bug 
  Database at: 

  <http://bugs.apache.org/>


  Enjoy!

  -The Apache JServ Project