cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] Cocoon2.1.4EasyInstallation CocoonCompetenceCenter Wed May 5 18:00:02 2004
Date Wed, 05 May 2004 16:00:02 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=Cocoon2.1.4EasyInstallation , version: 1 on Tue
May  5 15:59:21 2004 by 217.233.193.61

New page created:
+ !! Step 1: Download Cocoon-2.1.4
+ {{{volkmar@linux:~> cd /tmp/
+ volkmar@linux:/tmp> mkdir cocoon
+ volkmar@linux:/tmp> cd cocoon/
+ volkmar@linux:/tmp/cocoon>
+ volkmar@linux:/tmp/cocoon> wget -nd http://www.apache.org/dist/cocoon/cocoon-2.1.4-src.tar.gz.md5
+ --15:33:55--  http://www.apache.org/dist/cocoon/cocoon-2.1.4-src.tar.gz.md5
+            => `cocoon-2.1.4-src.tar.gz.md5'
+ volkmar@linux:/tmp/cocoon> wget -nd http://www.apache.org/dist/cocoon/cocoon-2.1.4-src.tar.gz
+ --15:33:56--  http://www.apache.org/dist/cocoon/cocoon-2.1.4-src.tar.gz
+            => `cocoon-2.1.4-src.tar.gz'
+ }}}
+ !! Step 2: Test MD5SUM
+ {{{
+ volkmar@linux:/tmp/cocoon> md5sum cocoon-2.1.4-src.tar.gz
+ 65a099094217ef0621e832ad5aa1cfc9  cocoon-2.1.4-src.tar.gz
+ volkmar@linux:/tmp/cocoon> cat cocoon-2.1.4-src.tar.gz.md5
+ 65A099094217EF0621E832AD5AA1CFC9  cocoon-2.1.4-src.tar.gz
+ volkmar@linux:/tmp/cocoon>
+ }}}
+ !! Step 3: Unpack tar.gz
+ {{{
+ volkmar@linux:/tmp/cocoon> tar xzf cocoon-2.1.4-src.tar.gz
+ volkmar@linux:/tmp/cocoon> ls -al
+ insgesamt 37717
+ drwxr-xr-x    3 volkmar  users         168 2004-05-05 15:48 .
+ drwxr-xr-x    5 volkmar  users         128 2004-02-22 11:03 ..
+ drwxr-xr-x    6 volkmar  users         648 2004-02-12 09:48 cocoon-2.1.4
+ -rw-r--r--    1 volkmar  users    38577140 2004-02-12 10:31 cocoon-2.1.4-src.tar.gz
+ -rw-r--r--    1 volkmar  users          59 2004-02-12 10:31 cocoon-2.1.4-src.tar.gz.md5
+ volkmar@linux:/tmp/cocoon>
+ }}}
+ !! Step 4: Enter and check the new directory
+ {{{
+ volkmar@linux:/tmp/cocoon> cd cocoon-2.1.4/
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4> ls -al
+ insgesamt 223
+ drwxr-xr-x    6 volkmar  users         648 2004-02-12 09:48 .
+ drwxr-xr-x    3 volkmar  users          80 2004-05-05 15:57 ..
+ -rw-r--r--    1 volkmar  users        5106 2004-02-12 09:48 blocks.properties
+ -rw-r--r--    1 volkmar  users        2149 2004-02-12 09:48 build.bat
+ -rw-r--r--    1 volkmar  users        4617 2004-02-12 09:48 build.properties
+ -rwxr-xr-x    1 volkmar  users         470 2004-02-12 09:48 build.sh
+ -rw-r--r--    1 volkmar  users        2970 2004-02-12 09:48 build.xml
+ -rw-r--r--    1 volkmar  users       12233 2004-02-12 09:48 cli.xconf
+ -rw-r--r--    1 volkmar  users        6193 2004-02-12 09:48 cocoon.bat
+ -rwxr-xr-x    1 volkmar  users        4597 2004-02-12 09:48 cocoon.sh
+ -rw-r--r--    1 volkmar  users        3444 2004-02-12 09:48 CREDITS.txt
+ -rw-r--r--    1 volkmar  users         277 2004-02-12 09:48 DESKTOP.INI
+ -rw-r--r--    1 volkmar  users        3524 2004-02-12 09:48 forrest.properties
+ -rw-r--r--    1 volkmar  users       34872 2004-02-12 09:48 gump.xml
+ -rw-r--r--    1 volkmar  users        4644 2004-02-12 09:48 INSTALL.txt
+ -rw-r--r--    1 volkmar  users        9329 2004-02-12 09:48 KEYS
+ drwxr-xr-x    2 volkmar  users        2080 2004-05-05 15:48 legal
+ drwxr-xr-x    6 volkmar  users         168 2004-05-05 15:48 lib
+ -rw-r--r--    1 volkmar  users        2710 2004-02-12 09:48 README.txt
+ drwxr-xr-x   12 volkmar  users         320 2004-02-12 09:48 src
+ -rw-r--r--    1 volkmar  users       93042 2004-02-12 09:48 status.xml
+ drwxr-xr-x   10 volkmar  users         248 2004-02-12 09:46 tools
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4>
+ }}}
+ !! Step 5: Build Cocoon
+ {{{
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4> ./build.sh webapp
+ }}}
+ Building Cocoon will take some time and generate some output on your screen. Finally it
will end up with
+ {{{
+ BUILD SUCCESSFUL
+ Total time: 4 minutes 37 seconds
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4>
+ }}}
+ !! Step 6: Check the newly created build/ directory
+ {{{
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4> cd build/
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4/build> ls -al
+ insgesamt 1
+ drwxr-xr-x    4 volkmar  users         104 2004-05-05 16:10 .
+ drwxr-xr-x    7 volkmar  users         672 2004-05-05 16:02 ..
+ drwxr-xr-x   11 volkmar  users         392 2004-05-05 16:12 cocoon-2.1.4
+ drwxr-xr-x    8 volkmar  users         336 2004-05-05 16:13 webapp
+ }}}
+ !! Step 7: Become Root and create a cocoon directory in /opt
+ {{{
+ volkmar@linux:/tmp/cocoon/cocoon-2.1.4/build> su root
+ Password:
+ linux:/tmp/cocoon/cocoon-2.1.4/build # mkdir /opt/cocoon
+ }}}
+ !! Step 8: Move webapp into this new directory
+ {{{
+ linux:/tmp/cocoon/cocoon-2.1.4/build # mv webapp/ /opt/cocoon/
+ linux:/tmp/cocoon/cocoon-2.1.4/build # ls -al /opt/cocoon/
+ insgesamt 0
+ drwxr-xr-x    3 root     root           72 2004-05-05 16:35 .
+ drwxr-xr-x   14 root     root          400 2004-05-05 16:25 ..
+ drwxr-xr-x    9 volkmar  users         360 2004-05-05 16:27 webapp
+ linux:/tmp/cocoon/cocoon-2.1.4/build #}}}
+ !! Step 9: Go there and rename it ROOT
+ {{{
+ linux:/tmp/cocoon/cocoon-2.1.4/build # cd /opt/cocoon/
+ linux:/opt/cocoon # ls -al
+ insgesamt 0
+ drwxr-xr-x    3 root     root           72 2004-05-05 16:35 .
+ drwxr-xr-x   14 root     root          400 2004-05-05 16:25 ..
+ drwxr-xr-x    9 volkmar  users         360 2004-05-05 16:27 webapp
+ linux:/opt/cocoon # mv webapp/ ROOT/
+ linux:/opt/cocoon # ls -al
+ insgesamt 0
+ drwxr-xr-x    3 root     root           72 2004-05-05 16:37 .
+ drwxr-xr-x   14 root     root          400 2004-05-05 16:25 ..
+ drwxr-xr-x    9 volkmar  users         360 2004-05-05 16:27 ROOT
+ linux:/opt/cocoon #
+ }}}
+ !! Step 10: Edit server.xml 
+ If you happened to start Tomcat already, you should now stop it! 
+ Go to Tomcat's configuration directory
+ {{{
+ linux:/opt/cocoon # cd ../jakarta-tomcat-5/conf/
+ linux:/opt/jakarta-tomcat-5/conf # ls -al
+ insgesamt 101
+ drwxr-xr-x    3 root     root          496 2004-05-05 16:26 .
+ drwxr-xr-x   11 root     root          352 2004-02-25 08:57 ..
+ drwxr-xr-x    4 root     root           96 2004-02-25 09:09 Catalina
+ -rw-------    1 root     root         6804 2004-02-14 11:26 catalina.policy
+ -rw-------    1 root     root         2715 2004-02-14 11:26 catalina.properties
+ -rw-------    1 root     root          778 2004-02-14 11:26 jk2.properties
+ -rw-------    1 root     root         1128 2004-02-14 11:26 server-minimal.xml
+ -rw-r--r--    1 root     root         1756 2004-03-05 12:45 server.xml
+ -rw-r--r--    1 root     root          433 2004-05-05 16:26 tomcat-users.xml
+ -rw-------    1 root     root        37477 2004-02-14 11:26 web.xml
+ }}}
+ and with your favourite editor open the file "server.xml". Search for the starting tag of
Catalina Engine,
+ {{{<Engine defaultHost="localhost" name="Catalina">}}}
+ below it, add the following lines
+ {{{
+   <Host appBase="../cocoon" name="cocoon">
+     <Logger className="org.apache.catalina.logger.FileLogger" 
+             prefix="cocoon_log." suffix=".txt" timestamp="true"/>
+   </Host>
+ }}}
+ and change Catalina's default host to cocoon
+ {{{<Engine defaultHost="cocoon" name="Catalina">}}}
+ so that, excluded all the comments, Catalina now looks like
+ {{{
+ <Engine defaultHost="cocoon" name="Catalina">
+ 
+   <Host appBase="../cocoon" name="cocoon">
+     <Logger className="org.apache.catalina.logger.FileLogger" 
+             prefix="cocoon_log." suffix=".txt" timestamp="true"/>
+   </Host>
+ 
+   <Host appBase="webapps" name="localhost">
+     <Logger className="org.apache.catalina.logger.FileLogger" 
+             prefix="localhost_log." suffix=".txt" timestamp="true"/>
+   </Host>
+ 
+   <Logger className="org.apache.catalina.logger.FileLogger" 
+           prefix="catalina_log." suffix=".txt" timestamp="true"/>
+ 
+   <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
+ 
+ </Engine>
+ }}}
+ Save your changes, close "server.xml" and restart Tomcat
+ {{{
+ linux:/opt/jakarta-tomcat-5/conf # cd ..
+ linux:/opt/jakarta-tomcat-5 # bin/startup.sh
+ Using CATALINA_BASE:   /opt/jakarta-tomcat-5
+ Using CATALINA_HOME:   /opt/jakarta-tomcat-5
+ Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5/temp
+ Using JAVA_HOME:       /usr/lib/java
+ linux:/opt/jakarta-tomcat-5 #
+ }}}
+ Now it's done. Become normal user and start your browser. If you follow the link [http://cocoon:8080/]
it should now take you to Cocoon's welcome page whereas [http://localhost:8080/] still will
go to Tomcat's welcome page with its docs and examples. 
+ But, as we changed Catalina's default host to Cocoon, now any other [http://anyhost:8080/]
will go to Cocoon as well. We will use this feature for doing virtual hosting with Cocoon
in a future description.
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=CocoonCompetenceCenter , version: 49 on Tue
May  5 15:59:51 2004 by 217.233.193.61

+ *[Setup Cocoon 2.1.4 as your default host|Cocoon2.1.4 easy installation] (another way to
do it)



Mime
View raw message