Installing Liferay 5.2 SP3 on JBoss 6 (M1)

Documentation: Initial Setup

INSTALLING FROM THE LIFERAY WAR FILE

I am writing this because there is no other documentation on how to install Liferay on JBoss 6. Note that this is on Milestone 1, as at the time of writing, Milestones 2 and 3 were not even able to clean startup straight from the .zip file.

Make sure your JBoss installation starts and runs before continuing. (This is important as I spent over an hour pulling my hair out wondering why I couldn't get Liferay to run on M3.)

Starting Out**#

Put the Liferay Dependencies bundle in your JBoss installation first. Do this by copying the .jar files into the $JBOSS_HOME/server/default/lib directory.

Configure JAAS**#


Edit $JBOSS_HOME/server/default/conf/login-config.xml and comment out the entire section where application policy is equal to "other" in lines 140-156.

<!--<application-policy name = "other">
... <authentication> <login-module code = "org.jboss.security.auth. spi.UsersRolesLoginModule" flag = "required" /> </authentication> </application-policy>-->}}}

Deploying the Liferay WAR**#


Delete all the files and folders in $JBOSS_HOME/server/default/deploy/ROOT.war

Use an archive program such as WinRAR or 7Zip to unarchive the Liferay WAR file to $JBOSS_HOME/server/default/deploy/ROOT.war

Additional Editing**#


Remove the following files from $JBOSS_HOME/server/default/deploy/ROOT.war/WEB-INF/lib

  1. jaxrpc.jar
  2. stax.jar
  3. xercesImpl.jar
  4. xml-apis.jar

Add the code "set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Duser.timezone=GMT" in the "run.bat" located in the $JBOSS_HOME/bin directory. This line of code will prevent Java memory issues.

Finally, to startup JBoss, execute "run.bat"

Hooray!

0 Attachments
11741 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments
Threaded Replies Author Date
Thanks Chris. Manish Kumar Gupta January 11, 2011 12:29 AM
I have installed Liferay 6.0.5 on Jboss... Sverker Abrahamsson June 27, 2011 3:24 AM

Thanks Chris.
Posted on 1/11/11 12:29 AM.
I have installed Liferay 6.0.5 on Jboss 6.0.0.Final and found this description after. I did slightly different:

* I put the portal dependencies in common/lib

* I did not do the edits in login-config.xml, seems to work fine anyway

* I deployed liferay to it's own directory under deploy/liferay.war as I wanted to keep the default ROOT.war. The trick is that liferay must not collide with ROOT.war web context path, which is controlled by liferay.war/WEB-INF/jboss-web.xml.

If context-root is set to / then there must also be a virtual-host entry. On earlier JBoss versions it was enough to set it here but on v6 it's also necessary to list all virtual hosts in deploy/jbossweb.sar/server.xml.

If context-root is set to anything else than / then that path must be set in the property portal.ctx in portal-ext.properties created in deploy/liferay.war/WEB-INF/classes

* I had to create a file deploy/liferay.war/WEB-INF/jboss-scanning.xml with the following content:

<scanning xmlns="urn:jboss:scanning:1.0">
</scanning>

* I removed the jar's as listed above (jaxrpc,jar, stax.jar, xercesImpl.jar, xml-apis.jar)

* I applied the patch found in http://issues.liferay.com/browse/LPS-13023

* I increased the memory for heap and perm size in run.conf.bat (for windows) or run.conf (for unix) to -Xmx1024M -XX:MaxPermSize=512M. It should not be needed to set the timezone on jvm level on Liferay 6.x
Posted on 6/27/11 3:24 AM.