Changes for page Tomcat Installation

Last modified by Thomas Mortagne on 2024/04/15

From version 1.15
edited by Vincent Massol
on 2007/01/22
Change comment: There is no comment for this version
To version 1.16
edited by Vincent Massol
on 2007/01/24
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,9 +1,30 @@
1 1  1 Tomcat Installation
2 2  
3 -Steps:
3 +1.1 Installation Steps
4 +
4 4  * Download and install [Tomcat>http://tomcat.apache.org/]. It's usually as simple as unzipping it in a directory. Let's call this directory ~~\[TOMCAT_HOME\]~~.
5 5  * Extract the [XWiki WAR>Main.Download] into a directory named ~~xwiki/~~ in ~~\[TOMCAT_HOME\]/webapps/~~. The reason you're expanding the WAR is because you'll need to modify one configuration file from inside the WAR later on when you configure the database access.
6 6  * (optional) If you want to modify the port on which Tomcat will run, edit ~~\[TOMCAT_HOME\]/conf/server.xml~~. Search for "8080" and replace with the port value you wish to use.
7 7  
8 -#info("When you later run XWiki in Tomcat you may get an Out Of Memory error, especially if you're trying to import large files into your wiki. To solve this allocate more memory to the JVM. For Tomcat this can be done by setting the ~~JAVA_OPTS~~ environment property (on Windows to allocate 300MB you would set ~~JAVA_OPTS~~ to ~~-Xmx300m~~). If you are running Tomcat as service then defining JAVA_OPTS will not help. There is a utility provided in the ~~bin~~ folder of your Tomcat installation (for example for Tomcat 5.x on Windows it's called tomcat5w.exe). It's a GUI tool which can be used to set various options including the heap size.")
9 +1.1 Potential Issues
9 9  
11 +1.1.1 Out Of Memory Error
12 +
13 +When you later run XWiki in Tomcat you may get an Out Of Memory error, especially if you're trying to import large files into your wiki. To solve this allocate more memory to the JVM. For Tomcat this can be done by setting the ~~JAVA_OPTS~~ environment property (on Windows to allocate 300MB you would set ~~JAVA_OPTS~~ to ~~-Xmx300m~~). If you are running Tomcat as service then defining JAVA_OPTS will not help. There is a utility provided in the ~~bin~~ folder of your Tomcat installation (for example for Tomcat 5.x on Windows it's called tomcat5w.exe). It's a GUI tool which can be used to set various options including the heap size.
14 +
15 +1.1.1 Java Security Manager
16 +
17 +You need to be careful to turn off the Java Security Manager for the Tomcat JVM. The reason is that by default XWiki tries to write its log file (xwiki.log) in the directory where Tomcat is started. If Tomcat is running in Sandbox mode (Java Security Manager on) then it won't allow this and you'll get an exception. In order to turn off the Java Security Manager, edit the Tomcat startup script.
18 +
19 +You might want to check your ~~etc/init.d/tomcat~~ file or ~~etc/default/tomcat5.5~~. You should see the following in the file:
20 +
21 +{code}
22 +# Use the Java security manager? (yes/no)
23 +TOMCAT5_SECURITY=
24 +{code}
25 +
26 +Make sure it is set to ~~no~~.
27 +
28 +#info("Note that we have an [issue logged>http://jira.xwiki.org/jira/browse/XWIKI-348] regarding this")
29 +
30 +

Get Connected