Installing Liferay in an existing appliation server

Normally Liferay is bundled with different application servers like Tomcat, Jboss, Glass Fish etc.But when our portal is going to deploy in production server, Liferay recommend a better and standard way of deploying the portal in an existing application server. Here I am explaining how to deploy Liferay 6.x portal in Jboss application server.

Softwares required :
  • Jboss-5.1.0.GA server.
  • Liferay-portal-6.0.6 war file.
  • Liferay-portal-dependencies-6.0.6 dependencies file.
  • mysql-connector-java-{$version}-bin.jar
Download and install  Jboss-5.1.0.GA server into your preferred directory.

Go to JBOSS_HOME/server/default/lib directory and copy mysql-connector-java-{$version}-bin.jar into it.

Then extract the Liferay-portal-dependencies-6.0.6 dependencies files and move it into
JBOSS_HOME/server/default/lib direcory.

If you want JBoss to manage the data source, use the following instructions. If
you want to use the built-in Liferay data source, you can skip this section.

Create $JBOSS_HOME/server/default/deploy/liferay-ds.xml with following content:

<datasources>
    <local-tx-datasource>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <connection-url>
         jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8
    </connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name></user-name>
   <password></password>
   <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>


Deploy Liferay

 Delete all the files and folders in $JBOSS_HOME/server/default/deploy/ROOT.war
Unzip the Liferay .war file to the ROOT.war directory.
Remove jaxen.jar, jaxrpc.jar, stax.jar, xercesImpl.jar, xml-apis.jar from$JBOSS_HOME/server/default/deploy/ROOT.war/WEB-INF/lib Navigate to the Liferay Home folder, which is one folder above JBoss's install location and create a file called portal-ext.properties and add the following directives to the file:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=
UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
If you are using JBoss's data source, add the JNDI name instead:
jdbc.default.jndi.name=jdbc/LiferayPool.

Now you can start Jboss server, once you started you can find liferay home page in http://localhost:8080 .



Comments

Popular posts from this blog

React development in Liferay - Overview

Deploy Liferay DXP on google cloud

Liferay React with Webpack