Saturday, November 20, 2010

Liferay : Installing on Tomcat as a non-root webapp context and using MySql

Started playing with liferay. Want to create an intranet application for a group of companies.

Liferay : Quoting from the liferay website,"Liferay Portal is an enterprise web platform for building business solutions that deliver immediate results and long-term value. Get the benefits of packaged applications and an enterprise application framework in a single solution."
Liferay portal includes :
  • Content & Document Management 
  • Web Publishing and Shared Workspaces 
  • Enterprise Collaboration 
  • Social Networking and Mashups 
  • Enterprise Portals and Identity Management 
Here I am going to share the resource and procedure I followed to setup Liferay community edition locally on my PC. [BTW, I am using windows 7]

Requirements :
Procedures :
  1. Unzip Liferay 6.0.5 WAR bundle file and copy all content into %TOMCAT_HOME%/webapps/liferay folder.[certainly you'll need to create the liferay folder within webapp folder :)]
  2. Unzip and copy all Liferay Portal dependencies 6.0.5 to %TOMCAT_HOME%/lib/ext [if the ext directory is not there, please do create it]
  3. Include the ext in your catalina properties ; update the following line on %TOMCAT_HOME%/conf/ : 
  4. Copy the two libraries (jta.jar and mail.jar) to %TOMCAT_HOME%/lib/ext
  5. Create liferay.xml file into %TOMCAT_HOME%/conf/Catalina/localhost folder. It looks like this:

    <Context path="/liferay" crossContext="true">



    In my case, DB user is “root” with empty password. You must create an empty DB in MySQL, for example “liferaydb”. Please also note the bold text.
  6. Create into %TOMCAT_HOME%/webapps/liferay/WEB-INF/classses folder. It looks like this:

  7. If you are using MySQL as database server instead of HSQL, you must copy mysql jdbc lib into %TOMCAT_HOME%/lib/ext folder.
  8. Run startup.bat/sh, you will see in console when liferay creates and populates the portal database automatically. Now, you can open browser window and enter the folow URL http://localhost:8080/liferay. Use and test as user and password respectively.
Resources :