basic setup copyright © 2005 liferay, llc all rights reserved. no material may be reproduced...

Download Basic Setup Copyright © 2005 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission from

If you can't read please download the document

Upload: maude-henry

Post on 13-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

  • Slide 1

Basic Setup Copyright 2005 Liferay, LLC All Rights Reserved. No material may be reproduced electronically or in print without written permission from Liferay, LLC. Slide 2 Objectives Basic Setup 1.Install Java 2.Unzip Tomcat Slide 3 Why use Tomcat? Tomcat is the fastest server for development of the extension environment. Use Tomcat for development even if you will use a different server for production. Then deploy your code to the other server for periodic testing. Changing servers is easy! Just change the app.server.type. For example, app.server.type=tomcat app.server.type=websphere Slide 4 Tomcat Requirements Java will need to be installed and JAVA_HOME will need to set in order for Tomcat to run. Whats JAVA_HOME? JAVA_HOME is an Environment Variable. You will need to point it to the directory where you installed your JDK. Note: We will go over how to set JAVA_HOME later in the presentation. Slide 5 Uninstall Previous Versions of Java We will be using J2SE 5.0 jdk-1_5_0_10-windows-i586-p.exe It is highly recommended that you uninstall all previous versions of Java even if you need it for another project. Java is easy to install, and you can always reinstall the version of Java that you need after the training session is over. Errors that occur from having multiple versions of Java will cause delays for the entire class. Slide 6 Install Java 1.First lets create a folder where we will install all Java-related tools: C:\Java 2.Next install J2SE 5.0. Double click jdk-1_5_0_10-windows-i586-p.exe 3.See the next slide for further instructions. Slide 7 4.Install J2SE 5.0 to C:\Java\jdk1.5.0_10\ instead of C:\Program Files\Java\jdk1.5.0_10\ (See below.) 5.Click Next until the installation has finished. Slide 8 1.Right click My Computer and click Properties Advanced Environment Variables 2.Under System Variables click New Make sure you click New under System variables NOT User variables 3.Variable name: JAVA_HOME Variable value: C:\Java\jdk1.5.0_10 Set JAVA_HOME Slide 9 Checkpoint Verify that JAVA_HOME is correct. Slide 10 1.Under System Variables click Path then Edit 2.Type %JAVA_HOME%\bin; at the beginning of the Path 3.Dont forget the semi-colon at the end! 4.Do not put spaces in your path. Example: %JAVA_HOME%\bin;%SystemRoot%\system32;%Sys temRoot%;%SystemRoot%\System32\Wbem;C:\Progr am Files\ATI Technologies\ATI Control Panel; Add JAVA_HOME to the Path Slide 11 1.Click Start Run 2.Type cmd and press Enter 3.Type path 4.Make sure that C:\Java\jdk1.5.0_10 is in the Path! 5.Make sure that there is only ONE JDK in your path! Checkpoint Slide 12 Unzip Tomcat 1.Create the following directory structure: C:\Training\liferay\tomcat 2.Download the Liferay-Tomcat bundle: http://prdownloads.sourceforge.net/lportal/lifera y-portal-tomcat-jdk5-4.1.3.zip?download 3.Whats the Liferay-Tomcat bundle? Its just Tomcat pre-configured to run Liferay 4.Unzip Tomcat (liferay-portal-tomcat-jdk5- 4.1.3.zip) to C:\Training\liferay\tomcat Slide 13 1.Go to C:\Training\liferay\tomcat\bin 2.Double click startup.bat Start up Tomcat Slide 14 Modify the Console Window Right click the Tomcat menu bar and select Properties Slide 15 Modify the Console Window 1.Click the Layout tab 2.Screen Buffer Size Width: 100 Height: 9999 3.Window Size Width: 100 Height: 30 4.Click Save properties for future windows with same title Slide 16 Look at the Console Window! Increasing the window size makes it easier to read the console. Increasing the screen buffer size allows us to see the full error message when an error is thrown. Make it a habit to read what is being displayed in the console even if you do not have an error! By the time we start developing our first portlet, you should know which messages indicate a successful startup and which messages indicate an error. As a developer you MUST learn how to read the console and track down the root cause of an error. Slide 17 Open up your web browser and type http://localhost:8080 You will automatically be redirected to http://localhost:8080/web/guest/home Slide 18 Congratulations! Congratulations! Youve just set up Liferay Portal! Login: [email protected] Password: test To hot deploy JSR-168 compliant portlets, Liferay layout templates, or Liferay themes just drop your *.war files in C:/home/liferay/deploy Sample portlets can be found here: http://www.liferay.com/web/guest/downloads/samples For more information on hot deploy, click here: http://content.liferay.com/4.0.0/docs/developers/ch06s01.html Slide 19 Revision History 08/28/06 Edward ShinAuthor 09/12/06 Mark WongUpdated for Liferay 4.1.2 11/13/06Edward ShinUpdated for JDK 1.5 Update 9, updated slides 10 and 12 12/07/06James MinUpdated for Liferay 4.1.3, JDK 1.5 Update 10