• Dreamhost Banner Ad

Windows Quick Installation Guide For Liferay 5.2.1 With Tomcat 6.0 Bundle and MySQL Database

I’ve been studying Liferay for the past few days. It’s an open source software that I only heard of after my company assigned me to study it. Unfortunately, there are some inconsistencies on the published official documentations and the published latest version. The documentations were outdated. Following their quick start guide will take a newbie like me to curse them. 🙂 The files they are referring don’t exist, or in different format. After days of experimenting and searching on the community forums, I was finally able to run it on my machine. Yey! And here’s the steps that I made. A newbie’s guide to Liferay installation! 🙂

I made this for my future reference and to help other Liferay newbies as well. With this installation, it is assumed that you already have an existing MySQL server.

1. Download Java. Go to http://java.sun.com and download the latest version of the JDK. It is labeled “Java SE.”

2. Install the Java SDK on your PC. Don’t install on the default location. Instead, install it on C:\Java. Use the subfolder name that it gives you (i.e., jdl1.6.0_06) so that the full path looks something like C:\Java\jdk1.6.0_06. When the installer for the JRE comes up, change the path for that too so that it is inside C:\Java.

3. Setup Environment Variables. Right click My Computer, click Properties. Click the Advanced tab. Click the Environment Variables button. Add a system variable (not user variable) called JAVA_HOME and point it to the directory to which you installed the JDK (i.e., C:\Java\jdk1.6.0_06). Click OK, and then edit the Path variable, which you’ll find in the list of system variables. At the beginning of the variable, add a section which reads %JAVA_HOME%\bin and put a semicolon (;) after it. Click OK until you come out of all the dialog boxes, and then open a Command Prompt window. Type java –version and press Enter. If you get a message telling you the version of Java, you’ve correctly configured the JDK.

4. Create an empty lportal database. Connect to your MySQL database and create an empty lportal database with the following command:



create database lportal character set utf8;

5. Download the Liferay Portal Bundle. Download it from this link. Select the Bundled with Tomcat 6.0 link. It’s a 135 MB zip file. Downloading will take you hours if you are on dial-up. 🙂

6. Install Liferay. You can install Liferay by simply unzipping it on your desired location. I unzipped mine on C:\Liferay folder. Let’s call that folder {liferay} on the succeeding instructions. It has already a bundled Tomcat application under the {liferay} folder which we will call {tomcat} folder.

7. Delete sample data. Delete the sevencogs-theme and sevencogs-hook folder from {liferay}\{tomcat}\webapps\ folder.

8. Connect to your MySQL database. Open your text editor and copy paste the following code. Of course, you have to use your MySQL credentials.


jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=YOURUSERNAME
jdbc.default.password=YOURPASSWORD

Save it as portal-ext.properties and save it in {liferay}\{tomcat}\webapps\ROOT\WEB-INF\classes folder

9. Run Liferay! Open {liferay}\{tomcat}\bin\ folder and double click startup.bat.

10. Login to Liferay using username: [email protected] and password: test.

11. Send me money for making your life easier. Hahaha!

Sources:

Liferay Quick Installation Guide for 5.1
Liferay Portal Administrator’s Guide for 5.1
Remove Sample Data Liferay Forum Thread
Problem in Liferay 5.2.1 Liferay Forum Thread

Note: Some instructions were copied verbatim.

Marhgil Macuha

Marhgil Macuha is a Computer Engineering graduate of Batangas State University. He is currently a Senior Solutions Developer at a Canadian IT company.

14 Comments:

  1. kaya pala di ka masyado nagpopost, e busy k. ayus yan post mo informative! 😉

  2. Sa Totoo lang di ko maintindihan ha ha ha. di ako programmer eh 🙂

  3. hahahaha. ung step number 11, un ang gets na gets ko!

  4. Pre, nag-deploy ako nyan dito sa office namin. Ginamit namin yung CMS and Collaboration. Ok yung Liferay. On process kami ng development ng application.

  5. Just wanted to mention one point here –
    If you are using the bundled Tomcat server and also have a separate Tomcat instance installed on your system, with the CATALINA_HOME environment variable pointing to the already installed Tomcat – your LifeRay will not deploy. Change or remove the CATALINA_HOME variable for easy deployment.

  6. Hi,
    I tried to install with liferay 5.2.2, so i met a problem:
    I did the same your steps but it did not success. The reason was in step 7 because when i deleted 2 folders “sevencogs-theme and sevencogs-hook ” and then run “startup.bat”, so i waited very long time but website did not apperence. When i restored 2 folders, it work nomarly but i did not change database.

    Please help me. Thank you!

  7. Thank you for this work. I too was frustrated with the lack of and inconsistency of the documentation on Liferay 5.x. Your instructions were great, and got me past the hurdle. I have used them as the starting point to generate a linux configuration/install as well: http://cmsperspective.blogspot.com/2009/04/liferay-portal-demo-with-mysql.html

  8. @Tom… you’re welcome! it took me 3 days before I figured these things out 😀

  9. I was finally able to run it on my machine. Yey! And here’s the steps that I made. A newbie’s guide to Liferay installation!I made this for my future reference and to help other Liferay newbies as well. With this installation, it is assumed that you already have an existing MySQL server.

  10. Slt à vous tous!
    je suis débutant sur liferay, j’ai passé 2 semaines à essayer l’installation de laferay suivant les tutos disponible sans succès. ce dernier me semble un peu cohérant, mais le hic, c’est qu’après l’etape 9, je sais plus quoi faire. j’ai à la dernière ligne de ma console Tomcat “INFO: Server Startup in 222761 ms”

    http://localhost:8080/ me donne juste l’interface de Tomcat mais aucun lien n’est opérationnels dans la colonne de gauche.
    ma question est comment passer à l’étape 10 du tuto….

    S’il vous plaît, j’ai besoin d’un coup de main. Merci!

  11. when i am building the ext(deploye) using liferay 5.2.x following error occurred
    Error running javac.exe compiler please help me how to over come this problem
    Thanks in advance

  12. i followed all the steps , but when i do localhost:8080 it show me the homepage of tomcat and never liferay
    please help meeeeeeeeee!!!

  13. Thaanks a tonn!!! Helped a lott…!!

  14. your step eight is not clear,which file do u paste that code????

Leave a Reply