Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Saturday, March 16, 2013

Eclipse Liferay IDE 1.5.2: Setting Up Eclipse IDE For Liferay Development


This tutorial guides the reader to setup Eclipse for Liferay Development based on Liferay 6.1.1 CE GA1.

PRE-REQUISITES:
1) eclipse_Liferay_IDE_1.5.2_v201203040240-win32.zip
2) liferay-ide-eclipse-updatesite-1.5.2.zip (note: you will not use this throughout the tutorial but rather keep it as backup in case your eclipse is missing liferay update files)
3) liferay-plugins-sdk-6.1.0-ce-ga1-20120106155615760.zip
4) liferay-portal-tomcat-6.1.0-ce-ga1-20120106155615760.zip
-the above files can be downloaded from http://sourceforge.net/projects/lportal/files/
5) usbwlportal.zip (usbwebserver pre-configured with lportal database)
-the above file can be downloaded from http://sites.google.com/site/notaliferay/home/developer/usbwlportal.zip




STEPS:
1) Extract the zip file “liferay-portal-6.1.0-ce-ga1” to c:\. If you already have the same folder name, add a number to the end. e.g liferay-portal-6.1.0-ce-ga1-1. We will call this folder LIFERAY_HOME.




2) Extract the folder “eclipse” from the zip file “eclipse_Liferay_IDE_1.5.2_v201203040240-win32”  to LIFERAY_HOME. e.g. LIFERAY_HOME\eclipse .




3) Extract the SDK zip file “liferay-plugins-sdk-6.1.0-ce-ga1-20120106155615760” to LIFERAY_HOME. e.g. LIFERAY_HOME\liferay-plugins-sdk-6.1.0-ce-ga1-20120106155615760 .




4) Extract the usbwlportal.zip file to LIFERAY_HOME e.g. LIFERAY_HOME\usbwlportal


5) The final folder setup will be as follows:



6) Configure Eclipse.
6.1) Run Eclipse.


6.2) Set Workspace. Optionally, you may set relative path or empty ("").


6.3) Go to menu Help\About. Check that Liferay icon is present.


6.4) Go to menu Window\Preferences. We will follow the shortcut steps.


6.5) Configure installed Liferay Plugin SDKs.


6.6) Create new Liferay Runtime Environment
Select Tomcat 7.
Tick Create a new local server.


6.6.1) Set Tomcat and JRE directory. JRE is provided by default. Click Finish.


6.7) Check in Server\Runtime Environments to ensure Liferay Server has been added into the list. Click Ok.


7) The main window now displays Server Project.
At the bottom of the window, notice the Server Tab.
Start the server.
Unblock Firewall if any.
(note: To make the server load faster, you can delete all folders within webapp folder except ROOT folder.)


8) The console window will display output message. Wait until the messaging is done.


9) Right-click the Server. Select Open Liferay Portal Home.




10) Liferay Portal is displayed via Internal Web Browser.
This indicates that everything is alright up to this point.



11) Notice that in Database Section above, the Default Database is Hypersonic.
Hypersonic is a type of flat file database used for portal demonstration purpose.
If you want to run Liferay Portal for development or production purpose, you need to change to other types of database such as MySQL.


CHANGING DEFAULT DATABASE TO MYSQL

12) Before configuring Liferay Portal for MySQL connection, you need to setup lportal database at the MySQL server.

12a) Use the following commands to setup the database:

mysql -u root -p
create database YourDatabaseName character set utf8;
create user 'lportal'@'localhost' identified by 'YourDatabasePassword';
grant all privileges on YourDatabaseName.* to 'YourDatabasePassword';
flush privileges;


12b) Or download the pre-configured usbwebserver bundle, http://sites.google.com/site/notaliferay/home/developer/usbwlportal.zip?attredirects=0&d=1 , using username/password as liferay@localhost/password.

13) Click Change.



14) Enter the connection details and click finish.


15) Click Go to My Portal to start using the portal.



No comments:

Post a Comment