Installing 6.0 WAR on Tomcat 6
IMPORTANT: For official instructions on how to deploy Liferay on any of the supported applications servers visit http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/initial-setup-4This wiki page just records specific instructions of a community member.
This only applies to Windows. At the time of writing this wiki, the author used Tomcat 6.0.26
I'm going to assume that you know how to install Tomcat. If not, you'll need to reference the documents on the Apache Tomcat website for assistance with that step, as it is outside the scope of this document.
Make sure your Tomcat installation starts and runs before continuing.
Install the Liferay Dependencies bundle in your Tomcat installation first. Do this by copying the files from the Dependencies .zip into the $TOMCAT_HOME/lib/ext directory. If you do not have the ext directory, create one. It should be noted that Tomcat requires 2 extra files:
- jta.jar (Available here; download class files and rename the ZIP file jta.jar.)
- mail.jar (Available here; located in root of the downloaded ZIP file.)
Be sure to include those 2 files in the $tomcat/lib/ext directory in addition to the Liferay Dependencies.
Deploying the WAR file#
1) Delete all files under TOMCAT_HOME\webapps\ROOT, then copy all of the files from the Liferay WAR to that directory.
2) Move the files from the .war to the now empty ROOT folder. The simplest way to do this is to open it with an archiver program such as 7zip or WinRAR, then copy/extract all of the files into ROOT.
3) Add the code
set "JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m"
in the startup.bat file located in the $TOMCAT_HOME/bin directory. This line of code will prevent Java memory issues.
Finally, to startup Tomcat, execute "startup.bat"