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

Preface#

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.

Dependencies#

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"

Hooray!

0 Attachments
11610 Views
Average (0 Votes)
Comments

Showing 9 Comments

al forbes
11/2/10 6:49 AM

" copy all of the files from the Liferay WAR to that directory."
Ok where is this file located? I search the entire liferay-portal-6.0.5 folder and there is no Liferay.war file or folder for that matter.

Italo Ney Pessoa
11/11/10 1:35 PM

where can I find the file liferay.war?

Denis Vaumoron
11/26/10 6:03 AM

you can build the liferay.war from source, see :
http://www.liferay.com/community/forums/-/message_boards/message/4259601

Jameson Hill
4/14/11 6:45 PM

I download the "liferay-portal-6.0.5.zip" file from http://www.liferay.com/downloads/liferay-portal/additional-files. When I extract all of the files to ROOT, it always results in a "SEVERE: Error listenerStart" error. Any ideas as to why this is happening?

Jameson Hill
4/16/11 4:47 PM

I've been trying to install the unbundled version of Liferay to an existing Tomcat 6 installation without success. I've followed these instructions closely, but to no avail; always ending up with a "SEVERE: Error listenerStart" error on server start-up, as Tomcat attempts to deploy the Liferay application.

nikhil kshirsagar
5/3/11 6:21 AM

I am trying to integrate liferay 5.1.1 with tomcat 6.0.26 and I followed the steps at http://www.liferay.com/community/forums/-/message_boards/message/1218314

Liferay comes up and I can login as test@liferay.com/test , but I don't see any of the administration pages (in guest/private pages) that I use for setting organization-> authentication ->opensso settings. Any idea why these pages are not seen at all ?

zahra zarei
10/31/11 7:13 AM

what about new portlets? I really hate Liferay!
It seems that liferay can't register them, when I deploy them it says:
Deployment will start in a few seconds.

and then nothing....
I google it and it seems it's a univeral problem!
don't you want to solve that?????

Jeff Okuhara
11/30/11 4:52 PM

I was able to install version 6.1 beta 4 on latest Tomcat 7.0.23 using the instuctions above as is and gettign around the "SEVERE: Error listenerStart" error...by adding and additional .jar called persistence.jar and modifying the catalina.properties file in the <apache home>\conf directory
look for... common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/l­ib,${catalina.home}/lib/*.jar

and add append ,${catalina.home}/lib/ext,${catalina.home}/lib/ext/*.jar to the end of it and result is..

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.hom­e}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/ext,${catalina.home}/lib/­ext/*.jar

Ryan Terwedo
1/21/12 12:54 PM

Jeff,

Can you elaborate on this? Where did you get the persistence.jar file from?

I am having this issue with LR 6.0.6 and Tomcat 6