basic setup copyright © 2000-2006 liferay, inc. all rights reserved. no material may be reproduced...
TRANSCRIPT
![Page 1: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/1.jpg)
Basic Setup
Copyright © 2000-2006 Liferay, Inc.
All Rights Reserved.No material may be reproduced electronically or in print without written
permission from Liferay, Inc.
![Page 2: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/2.jpg)
Objectives
Basic Setup
1. Install Java
2. Install Liferay/Tomcat bundle
![Page 3: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/3.jpg)
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=tomcatapp.server.type=websphere
![Page 4: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/4.jpg)
Tomcat Requirements
• Java will need to be installed and JAVA_HOME will need to set in order for Tomcat to run.
• What’s 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.
![Page 5: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/5.jpg)
Uninstall Previous Versions of Java
• We will be using J2SE 5.0 jdk-1_5_0_08-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.
![Page 6: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/6.jpg)
Install Java
1. First let’s create a folder where we will install all Java-related tools:C:\Java
2. Next install J2SE 5.0. Double clickjdk-1_5_0_08-windows-i586-p.exe
3. See the next slide for further instructions.
![Page 7: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/7.jpg)
1. Install J2SE 5.0 to C:\Java\jdk1.5.0_08\ instead of C:\Program Files\Java\jdk1.5.0_08\ (See below.)
1. Click Next until the installation has finished.
C:\Java\jdk1.5.0_08
![Page 8: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/8.jpg)
1. Right click My Computer and click Properties Advanced Environment Variables
2. Under System Variables click NewMake sure you click New under System variables NOT User variables
3. Variable name: JAVA_HOMEVariable value: C:\Java\jdk1.5.0_08
Set JAVA_HOME
C:\Java\jdk1.5.0_08
![Page 9: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/9.jpg)
Checkpoint
Verify that JAVA_HOME is correct.
C:\Java\jdk1.5.0_08
![Page 10: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/10.jpg)
1. Under System Variables click Path then Edit2. Type %JAVA_HOME%\bin; at the beginning of
the Path3. Don’t forget the semi-colon at the end!
Example:%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;
Add JAVA_HOME to the Path
![Page 11: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/11.jpg)
1. Click Start Run…2. Type cmd and press Enter3. Type path4. Make sure that C:\Java\jdk1.5.0_08 is in the Path!5. Make sure that there is only ONE JDK in your path!
Checkpoint
![Page 12: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/12.jpg)
Unzip Tomcat
1. Create the following directory structure:C:\Training\liferay\tomcat
2. Locate the Liferay-Tomcat bundle on CD:liferay-portal-tomcat-jdk5-4.1.2.zip
3. What’s the Liferay-Tomcat bundle?It’s just Tomcat pre-configured to run Liferay.
4. Unzip Tomcat (liferay-portal-tomcat-jdk5-4.1.1.zip) to C:\Training\liferay\tomcat
![Page 13: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/13.jpg)
1. Go to C:\Training\liferay\tomcat\bin
2. Double click startup.bat
Start up Tomcat
![Page 14: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/14.jpg)
Modify the Console Window
Right click the Tomcat menu bar and select Properties
![Page 15: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/15.jpg)
Modify the Console Window
1. Click the Layout tab
2. Screen Buffer Size
Width: 100
Height: 9999
1. Window Size
Width: 100
Height: 30
1. Click Save properties for future windows with same title
![Page 16: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/16.jpg)
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.
![Page 17: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/17.jpg)
Open up your web browser and type http://localhost:8080You will automatically be redirected to http://localhost:8080/web/guest/home
![Page 18: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/18.jpg)
Congratulations!
Congratulations! You’ve 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
![Page 19: Basic Setup Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission](https://reader036.vdocuments.mx/reader036/viewer/2022062410/56649eb15503460f94bb69ee/html5/thumbnails/19.jpg)
Revision HistoryEdward Shin 8/28/2006 Updated for Liferay 4.1.1
Mark Wong 9/12/2006 Updated for 4.1.2