Solution Analysts
In this brief tutorial, we will discuss how to
setup Liferay with Apache tomcat Web Server.
Requirements before getting started #
- JAVA (JDK & JRE)
- Eclipse IDE
- Liferay Tomcat bundle (Community Edition or Enterprise Edition)
- Liferay Plug-in SDK
- Apache Ant (with ecj.jar if not having)
Step
-1: Download & Installation
1) To setup machine for
Liferay development first of all download JDK from below link and install.
2) Download eclipse from
below link.
3) Download Liferay plug-in
SDK and Tomcat bundle from below link.
4) Download Apache ant
version 1.8.1 from below link.
That’s all about
downloading and installation bundles for development.
Step
-2: Setting UP Environment Variables
Set JAVA_HOME:
Set LIFERAY_HOME:
Set ANT_HOME:
Step
- 3: Eclipse Configuration for Liferay
Development
First open eclipse and follow the instruction below,
1) Go to Help menu --> Eclipse Marketplace
2) Find here “Liferay” and just install Liferay IDE.
Install Liferay IDE and
restart eclipse.
Step
- 4: Liferay Plug-ins SDK Setup
1) Open eclipse with Liferay
IDE installed.
2) Open Preference page for
Liferay (Go to window ->preferences -> Liferay -> Installed plugin SDK).
3) Here press the add button.
4) Browse to the location of
your Plug-ins SDK installation.
5) Select OK and you should
see your SDK in the list of installed SDKs.
6) Here, at the bottom of
dialog screen, you will have option to update build. <username>.properties
file. Select here prompt.
Congratulations! Your system
is ready with development environment for Liferay.
Note: multiple SDKs can be added to the preferences but
you will need to select at least one SDK to be the default.
Step
– 5: Liferay Portal: Apache Tomcat Runtime/Server Setup #
1) From eclipse go to Window
àPreferences à
Server àRuntime environments.
2) Now,
Click on Add to add a new Liferay runtime and find Liferay V6.1 tomcat under
the Liferay, Inc. and press next button.
3) Now,
set the Liferay tomcat directory here, also set the runtime JRE (Liferay v6.1
CE(tomcat 7) JRE) and press next button.
4) Set here Liferay
tomcat bundle zip file. And press Finish.
Step
– 6: Set build.username.properties file
Set here tomcat directory
path if not configured properly.
app.server.type=tomcat
app.server.dir=${project.dir}/../bundles/tomcat-7.0.23
app.server.deploy.dir=${app.server.dir}/webapps
app.server.lib.global.dir=${app.server.dir}/lib/ext
app.server.portal.dir=${app.server.dir}/webapps/ROOT
Step
– 7: Create new Liferay Plug-in Project
1) Now,
a SDK and portal server have been configured. You can create a new Liferay plug-in
project.
Go
to file àNew à
Liferay project.
2) In
the Liferay Plug-in project page, First add the project name and
display name. after that select the SDK and Liferay runtime and then
select the plug-in type (Portal is default) and you can create a new
plug-in project by clicking finish.
3) If
it worked fine than you should see a new
plug-in project in the package explorer, so you are to begin Plug-in development.
Step
– 8: Deploy Portlet
1) Right
click on portlet plug-in project àselect
LiferayàSDKàdeploy
2) If deployment is successful than you got the message in
console"BUILD SUCCESSFUL"
Step
– 8: Start Apache tomcat server
1)
Run startup.bat from your Liferay tomcat bundle bin directory.
wait till server start up.
No comments:
Post a Comment