• 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 a professional network marketer in the Philippines, with business partners all over the world.

Facebook Comments

Leave a Reply