The tools we are going to use are:
1. Java V 1.5 and above.
2. Maven: It makes life so much easier.
3. Eclipse IDE
4. MySQL database
5. Liferay Community Edition bundled with Tomcat: Latest version is available at liferay.com
- Install Java JDK 7: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.htmlSet the JAVA_HOME environment variable.Update the path environment variable. Add ;%JAVA_HOME%\bin; at the end.
- Download Apache Maven: http://maven.apache.org/docs/3.0.5/release-notes.html
- Unzip it at a convenient location. Lets say C:\development\maven
- Add another Environment variable MAVEN_HOME with the above location.
- Again update path environment variable. Add ;%MAVEN_HOME%\bin; at the end.
- Go to windows console using cmd. Type mvn -version to check if it works.
- Next download Eclipse. I usually use Eclipse IDE for Java EE Developers. URL: http://www.eclipse.org/downloads/
- Once download is complete extract eclipse at a convenient location like C:\development\eclipse
- Now install Maven plugin for eclipse. Just go to help->install new software, in eclipse.
- Use the following update site: http://download.eclipse.org/technology/m2e/releases
- Now from eclipse navigate to window->preferences->maven->installations and add the maven location you just extracted.
To download Liferay go to the following website and download there tomcat bundle. http://www.liferay.com/downloads/liferay-portal/available-releases
Liferay uses hypersonic database by default.
I prefer MySQL database since its free and pretty good. You will need MySQL server and workbench. Both can be installed from the MySQL website.
When you will start Liferay for the first time it will ask for database configuration. You can either configure database then or you can place a properties file under the root directory where you extracted the bundle.
Liferay creates a properties file by default when you configure database at startup. If it doesn't you can create a portal-setup-wizard.properties with following content:
If you are working with the latest version of MySQL and Liferay bundle you might see database related exceptions on startup.
To resolve these just download mysql-connector-java-5.1.25 and place it in tomcat/lib/ext folder.
Next we will look at how to create our first Portlet.