Liferay 7 Tutorials
This page offers list of Liferay 7 tutorials and please access all of them from left menu. This tutorial is Liferay 7 development setup tutorial for beginners who are about to start.
- Liferay uses plugin sdk development environment and hold portlets,themes,layouts,ext,hooks and ANT Build scripts.
- Liferay 7 uses OSGI platform that replaces traditional use of plugin-sdks with OSGI Modules, but still Liferay 7 supports Plugin SDK development.
- Liferay 7 uses liferay-workspace to hold all modules,gradles, libraries,themes,wars,configs
- portal-service.jar renamed to portal-kernel.jar, so liferay 6 code base need to be update with new API change in Liferay7 migration process.
Liferay 7 Development Setup:
Step1: Download Liferay and Java8
- Click here to download Liferay7 tomcat community edition(liferay-ce-portal-tomcat-7.0-ga3) from sourceforge
- Download Eclipse IDE :liferay-ide-eclipse-windows-x64-3.1.0-M1. I recommend to download liferay-ide-neon-m1 version as it is latest one.
- Install Java8
- MySQL version should be greater than 5.6
- Extract the eclipse and it requires JDK8. update eclipse.inf file with -vm argument with JDK 8 bin path
-
--vm C:/Program Files/Java/jdk1.8.0_101/bin -vmargs -Dosgi.requiredJavaVersion=1.8 -XX:+UseG1GC -XX:+UseStringDeduplication -Dosgi.requiredJavaVersion=1.8 -Xms768m -Xmx1256m
Step2: Create Liferay Workspace
Liferay workspace need to create to hold all modules and make sure that you configured proper proxy settings in eclipse if you are behind firewall. Go to windows-> preferences -> Network settings and select Manual. Update the with corp user name and password.
In eclipse, click on File-> New -> Liferay Workspace Project and provide workspace name. It will download all required libraries from gradle repository.
Step3 : Liferay 7 workspace structure
Step4 : Liferay 7 Tomcat Setup in Eclipse
Now, we will configure tomcat in Liferay. Click on File->New-> Server; Select Liferay 7.x and click on Next. Update the tomcat server location with download tomcat and Lieray bundles directory with in liferay home(which you extracted liferay-ce-portal-tomcat-7.0-ga3)
.
Step5 : Liferay 7 Bundles auto configuration
In Liferay 7 community edition, module auto deployment path need to configure and can done in two ways
-
- Liferay tomcat runtime:
- gradle.properties – open gradle.properties file in liferay-workspace folder and add the below property
- liferay.workspace.home.dir=D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3
Step6: Liferay 7 Database configuration
- liferay.workspace.home.dir=D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3
- Create database in mysql : create database lportal7_ce character set utf8;
- Create portal-ext.properties file and add below database properties and liferay home.
-
jdbc.default.url=jdbc\:mysql\://localhost:3307/lportal7_ce?useUnicode\=true&characterEncoding\=UTF-8&useFastDateParsing\=false jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.username=root jdbc.default.password=root liferay.home=D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3
Copy the mysql to tomcat\lib\ext if not is not exist and start the server and you will get config page and complete the setup
- Liferay home page will open and start developing portlet.