File: install.xml

package info (click to toggle)
turbine 20010419-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 17,460 kB
  • ctags: 7,501
  • sloc: java: 41,929; xml: 12,430; sql: 637; sh: 90; makefile: 50
file content (379 lines) | stat: -rw-r--r-- 11,436 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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<?xml version="1.0"?>

<document>

 <properties>
  <title>Turbine Installation</title>
  <author email="a@a.com">Turbine Documentation Team</author>
 </properties>

<body>

<section name="Before you Begin">

<p>
Before reading the rest of this install document, please take a moment
to read these disclaimers:
<ul>
<li>
Turbine is still under development.  Although many parts of Turbine
may be production-ready, the project as a whole is not, and there is no
production-ready release of Turbine.  If you check out the latest
Turbine from CVS at any given point, do not expect that it will compile
or that all members of the framework will function as expected.</li>
<li>
Because Turbine is being constantly improved, much of the documentation
on the site is out-of-sync with what is in CVS.  Please be patient with
us, or join the <a href="http://jakarta.apache.org/site/mail.html">mailing list</a>
to learn how to contribute to the documentation.</li>
<li>
Please note, Turbine probably won't build or run on MacOS 9 boxes. You
should use MacOS X or Linux or *BSD on your Apple hardware
instead.</li>
</ul>
</p>

</section>


<section name="The TDK">

<p>
    All of the necessary packages required to use Turbine (except the
    JDBC drivers) now come in the Turbine Developer's Kit (TDK).  The
    latest announced version of the TDK is always available at
    <a href="http://jakarta.apache.org/turbine/tdk/">http://jakarta.apache.org/turbine/tdk/</a>.
</p>
</section>


<section name="JDBC Database Drivers">

<p>
<ul>
    <li>
        MM MySQL JDBC Drivers are <a href="http://www.worldserver.com/mm.mysql">here</a>.
        However, they come installed in the TDK by default.</li>

    <li>
        Oracle JDBC Drivers are <a href="http://technet.oracle.com/software/tech/java/sqlj_jdbc/software_index.htm">here</a>.</li>

    <li>
        Postgres JDBC Drivers are <a href="http://www.postgresql.org/">here</a>.</li>

    <li>
        InstantDB JDBC Drivers are <a href="http://instantdb.enhydra.org/">here</a>.</li>
</ul>
</p>

<p>
If your database is not listed here, please subscribe to the Turbine mailing
list and send us the link to the drivers so that we can add it
<a href="http://jakarta.apache.org/site/mail.html">here</a>.
</p>

</section>

<section name="Installing the TDK">

<p>
    Unpack the TDK distribution into a directory of your choosing.  Be
    certain to check the target path of the files as the root folder for
    the TDK distribution sometimes changes.  On Windows, just use WinZip
    to determine if the files are going to be installed into a 'tdk'
    root directory, or if you'll need to create it.  On Unix, something
    like:
</p>

<source><![CDATA[

gzip -dc tdk1.1a10.tar.gz |tar tvf -

]]></source>

<p>
    Should to the trick.
</p>

</section>

<section name="Building the Application Structure">

<p>
    The TDK comes with Ant and Ant build scripts to create the core
    directory structures and enough template files to get most
    applications started quickly.  The TDK can build two types of
    applications - "simple" for applications not requiring a database
    schema or Object Relational (OR) model, or "peer" for applications
    using the Peer tool for OR.
</p>

<p>
    You should first check and modify as necessary the newapp.props file
    in the root of the TDK distribution.  The turbine.app.name is the
    name that you want your application to have.  A servlet context will
    be created with this name, and (if you're using a Peer application),
    a database by this name will be created.  The turbine.app.view is
    the template system that will be used for your application.  The
    recommended value here is velocity. The turbine.app.type can be
    either simple or peer.  The target.package is the package that all
    of your Java classes (all the OR classes, and modules) will go in,
    and the target.directory is the directory structure they will go
    under.  This should PROBABLY match the package structure, except
    use '/' as the delimeter.
</p>

<p>
    Once the newapp.props file has been built, run the newapp script
    in the root of the TDK distribution directory - either newapp.sh on
    Unix, or newapp.bat on Win32.  The Ant script will create the
    necessary directory structure and configuration files to get your
    application started.  Be sure to read any directions at the end of
    the script processing - especially if you're creating a peer
    application.
</p>

</section>

<section name="Starting Catalina/Viewing Your Application">

<p>
    Once your application has been created, you should be able to view
    it by changing directories to the root of the TDK distribution and
    running bin\startup.bat on Win32, or bin/startup.sh on Unix.
    Once Catalina has started, point your browser to
    http://SERVERNAME:8080/APPNAME/servlet/APPNAME where SERVERNAME is
    the hostname of the machine running Catalina, and APPNAME is the
    name of the application you created.
</p>

</section>

<section name="Servlet Container Specifics">

<p>
<strong>With Apache JServ</strong>
</p>

<p>
    #1. Specify the path to the necessary packages
</p>

<p>
    Place the packages that you will not be changing into the wrapper.classpath
    (in jserv.properties). Please see this FAQ entry (line wrapped) for more
    information on determining what will change and what won't change look
    <a href="http://java.apache.org/jyve-faq/Turbine/screen/DisplayQuestionAnswer/action/SetAll/project_id/1/faq_id/2/topic_id/69/question_id/322">here</a>.
</p>

<p>
Here is an example:
</p>

<source><![CDATA[

wrapper.classpath=<path to>/ECS.jar
wrapper.classpath=<path to>/Village.jar
wrapper.classpath=<path to>/jndi.jar
wrapper.classpath=<path to>/mail.jar
wrapper.classpath=<path to>/activation.jar

]]></source>

<p>
    Place the rest of the classes that you will be using, such as your Turbine
    classes into the repositories path that is defined in your zone.properties
    file.
</p>

<p>
    #2. Run the appropriate SQL script for your database.  If a script for your
    specific database is not present, the SQL can easily be adapted. We
    appreciate your contributions here. If your database is not supported by
    the connection pooling code, please subscribe to the mailing list and ask
    for help there. Include the type of database and the driver information in
    your posting.
</p>

<source><![CDATA[

mysqladmin create turbine
mysql turbine < tables.schema

]]></source>

<p>
    Please note that the tables.schema file is not actually a single file. The
    various schema files exist in the src/sql/ directory. You will need to choose the
    appropriate .sql file for your needs according to what database you are using.
    We currently have .sql files for Oracle, MySQL, DB2, Hypersonic,
    Sybase, InstantDB, and Postgres. The ones that are
    the most tested and reliable are the MySQL files because this is our database of
    choice. Contributions for more databases is most appreciated.
</p>


<p>
    #3. Edit TurbineResources.properties file (in the conf directory), define
    your database types and make sure that the database adaptor for your
    database is uncommented, and place this file in a directory accessible to
    your servlet engine.
</p>

<p>
    #4. Specify an initial parameter named "properties" (without the quotes)
    with the pathname to the TurbineResources.properties file as its value.
    This can be accomplished by placing the following line in your
    [zone].properties file:
</p>


<source><![CDATA[

servlet.Turbine.initArgs=properties=/path/to/TurbineResources.properties

]]></source>

<p>
<strong>With Tomcat</strong>
</p>

<p>
    Note that the TDK includes Catalina, which is Tomcat 4.0.  All the
    necessary JAR files for Turbine are included in the target
    application when you use the TDK, and this is the recommended method
    of using Tomcat.  If you need to deploy a TDK application to another
    Tomcat installation, you should be able to make a WAR file of the
    application and drop it into the webapps directory on the target
    platform.
</p>

<p>
    The following instructions assume that you have followed the above
    instructions for either source compilation or release distribution. This
    also assumes that you have working Tomcat installation which can be
    found <a href="http://jakarta.apache.org/tomcat">here</a>.
</p>

<p>
<ul>
    <li>
        TOMCAT_HOME=/path/to/tomcat</li>

    <li>
        Put all necessary Turbine-related jars (Turbine, ECS, Village,
        JNDI) into $TOMCAT_HOME/lib.</li>

    <li>
        Add the path to the jars to the existing Tomcat CLASSPATH found in
        $TOMCAT_HOME/bin/tomcat.sh</li>

    <li>
        Make necessary adjustments to TurbineResources.properties and copy into
        $TOMCAT_HOME/webapps/YOUR_APP_CONTEXT/WEB-INF/conf</li>

    <li>
        Add the following xml to $TOMCAT_HOME/$TOMCAT_HOME/webapps/YOUR_APP_CONTEXT/WEB-INF/web.xml. It
        will be a child of the web-app element.</li>
</ul>
</p>

<source><![CDATA[

<servlet>
    <servlet-name>Turbine</servlet-name>
    <servlet-class>org.apache.turbine.Turbine</servlet-class>
    <init-param>
        <param-name>properties</param-name>
        <param-value>WEB-INF/conf/TurbineResources.properties</param-value>
    </init-param>
    </servlet>
]]>
</source>

<p>
<ul>
    <li>
        Restart Tomcat.</li>
</ul>
</p>

</section>


<section name="Testing Your Installation">

<p>
The following examples assume your servlet zone is configured at
http://your.host.com/servlets.  If this is not the case, please substitute your
zone name for /servlets (Tomcat uses /servlet for its default servlet zone).
</p>

<ul>

    <li>
        Point your web browser at http://your.host.com/servlets/Turbine</li>

    <li>
        Login using username 'turbine' and password 'turbine'</li>

    <li>
        You should see a Welcome screen with basic request information.</li>
</ul>

<p>
If you have problems or receive exceptions when following these steps, please
subscribe to the mailing list and ask for help.  Be sure to include the
specific steps you followed, where the error occurred, and what the exact text
of the error message is.
</p>

</section>



<section name="Ant Tasks available in build-turbine.xml">

<p>
The build-turbine.xml contains many Ant tasks. These are run by typing from the command line;

<ul>
   build-turbine taskname
</ul>

for example, to run the task which generates the turbine-pool.jar type;

<ul>
  build-turbine pool
</ul>
</p>

<p>
Other Ant tasks in build-turbine.xml include;
</p>

<p>
  <ul>
  usage - Shows a list of Ant Tasks available. <br />
  compile - Compiles the source code.<br />
  jar - Generates the turbine.jar file ( default ). <br />
  jarsrc - Generates the turbine.src.jar file with source only.<br />
  pool - Generates the Turbine Connection Pool jar.<br />
  docs - Generates the HTML documentation from the XML files in xdocs.<br />
  javadocs - Generates the API Information.<br />
  package-zip - Generates the Turbine distribution as a ZIP archive.<br />
  package-tgz - Generates the Turbine distribution as a TAR.GZ archive.<br />
  run-tests - Runs all available testcases.<br />
  torque - Generates a torque.jar for stand-alone use. <br />
  clean - Cleans up the build directory.

  </ul>
</p>

</section>



</body>
</document>