Install Liferay Configuration

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Quick Installation Instructions

Tags: installation deployment setup liferay v5.0 liferay v5.1 liferay v5.2

Table of Contents [-+]

● 1 Hardware
● 2 Prerequisites
● 2.1 Java
● 2.2 Web Browser
● 3 Windows
● 4 Linux and Mac OS X
● 5 Next Steps
● 6 Installing GlassFish from a JAR file
● 7 Learning more and getting support
The purpose of this guide is to provide instructions for a Liferay Portal bundle. A bundle
includes Liferay Portal together with an Open Source application server so that it's ready to
run.

Hardware
Regardless of operating system, you will need a minimum of 1GB of RAM in order to ensure
that Liferay is as stable as possible. You can run it on machines with less than 1GB of RAM,
but it will require tinkering with your Java parameters and may not be entirely stable.

Prerequisites
In order to install a portal bundle you will need the following software installed:

Java

Java 5 or later.
If you're running Linux or Mac OSX on your machine, the JDK is generally provided by the
vendor of your operating system, either on a CD or in a downloadable software repository.
If you're running Windows, a JRE is contained in the bundle. If you don't want to use this,
then it's a little more complicated. Go to http://java.sun.com and download the latest
version of the JDK. It is likely labeled “Java SE” in the Popular Downloads section. When you
install it, don't install it in the default location. Instead, install it to a folder near the root
folder on your machine, such as C:\Java. Use the subfolder name that it gives you (i.e.,
jdk1.6.0_06) so that the full path looks something like C:\Java\jdk1.6.0_06. When the
installer for the JRE comes up, change the path for that too so that it is inside C:\Java.
When you are finished, go to your Control Panel and click the System icon. Go to Advanced,
and click the Environment Variables button. Add a new system variable (not a user variable)
called JAVA_HOME, and point it to the directory to which you installed the JDK (i.e.,
C:\Java\jdk1.6.0_06). Click OK, and then edit the Path variable (you don't need to add it,
it is already among your variables), which you'll find in the list of system variables. At the
beginning of the variable, add a section which reads %JAVA_HOME%\bin and put a
semicolon (;) after it. Click OK until you come out of all the dialog boxes, and then open a
Command Prompt window. Type java –version and press Enter. If you get a message telling
you the version of Java, you’ve correctly configured the JDK. If not, check your JAVA_HOME
variable to see if you have it pointing to the location of your JDK install correctly, and make
sure your syntax is correct in your Path variable.
● Note: This article frequently talks about the JDK, but a JRE will usually be enough - at
least when you're running the tomcat bundle. You might need to set JRE_HOME
instead of JAVA_HOME though.
● Note: Java 1.4 can be used for Liferay up to version 4.4.

Web Browser

A web browser such as Firefox or Internet Explorer

Windows
1) Download the desired bundle from http://www.liferay.com/web/guest/downloads/portal
Note: There are several bundles using different servers. The one recommended to follow
this guide is Liferay + Tomcat5.5
2) Unzip the bundle file by clicking the right button and selecting the appropriate menu from
the context menu Note: It's recommended to avoid unzipping the file within a folder which
has spaces in the name or that has a parent with spaces in the name. For example, use
c:\liferay

3) Version 5.2: Enter the folder created, then the server folder (tomcat-5.5.27 if you are
using the recommended bundle) and the bin subfolder. Run Liferay by double-clicking the
startup.bat.

Version 5.1 and earlier: Enter the folder created, and the bin subfolder. Run Liferay by
double-clicking the startup.bat.
Note that the name of the file to run Liferay varies depending on the application server
used. If you are not using the recommended bundle (which uses Tomcat 5.5), refer to the
application server documentation.

4) Liferay will startup in 30-60 seconds on modern computers.


Version 5.2: Liferay will automatically open in the default browser when it is ready.
Version 5.1 and earlier: Wait until you see a line similar to the following appear in the
logs:
INFO: Server startup in 42950 ms
(On Tomcat, logs are located at {tomcat-home}/logs/catalina.out. You can use the Console
application to view the logs or try the "tail" command in a Terminal window: "tail -f
{tomcat-home}/logs/catalina.out")

5) Open a browser and go to http://localhost:8080


6) Version 5.2: You will find some sample data in your portal. Login as any of the users
already created (you will find their credentials in the welcome page of the portal). The user
with administration privileges has the following credentials:
● Email address: [email protected]
● Password: bruno
If you remove 7Cogs sample data, then the user with administration privileges will be
[email protected] and password test.
Version 5.1 and earlier: Login as user [email protected] and password test. This user has
all administration privileges.
7) New in Version 5.2: Control Panel consolidates Administration portlets into one
interface: If you are looking for the administration portlets, you'll find them in the "Control
Panel," which is one of the menu items in the dock in the upper right.

Linux and Mac OS X


1) Download the desired bundle from http://www.liferay.com/web/guest/downloads/portal
Note: There are several bundles using different servers. The one recommended to follow
this guide is Liferay + Tomcat5.5
2) Unzip the bundle file using the unzip command. For example:
$ cd /opt/liferay
$ unzip liferay-portal-tomcat-5.5-5.1.0.zip
Note: you will need root permissions to use the opt directory. You can choose another
directory inside your home directory to make it simpler. Unzipping the archive leaves the
shell scripts not-executable. We'll fix that in the next step:
3) Version 5.2: Execute startup.sh from within the bin subdirectory inside the server
directory (tomcat-5.5.27 if you are using the recommended bundle):
$ cd liferay-portal-5.2.0/tomcat-5.5.27/bin
$ chmod +x *.sh
$ ./startup.sh
Version 5.1 and earlier: Execute startup.sh from within the bin subdirectory:
$ cd liferay-portal-tomcat-5.5-5.1.0/bin
$ chmod +x *.sh
$ ./startup.sh
Note that the name of the file to run Liferay varies depending on the application server
used. If you are not using the recommended bundle (which uses Tomcat 5.5), refer to the
application server documentation. Also note that starting Liferay 5.1 from a different
working directory might cause liferay to start with an empty database, as the default hsqldb
database is located in the $TOMCAT_HOME/bin directory and referred to as being in "." -
e.g. the current directory. The directory where the database files are located in must be
writable by the user tomcat is running as - e.g. your own user account.
4) Liferay will startup in 30-60 seconds on modern computers.
Version 5.2: Liferay will automatically open in the default browser when it is ready. (is this
real? I can't remember to have seen this...)
Version 5.1 and earlier: Wait until you see a line similar to the following appear in the
logs:
INFO: Server startup in 42950 ms
(On Tomcat, logs are located at {tomcat-home}/logs/catalina.out. You can use the Console
application to view the logs or try the "tail" command in a Terminal window: "tail -f
{tomcat-home}/logs/catalina.out")

5) Open a browser and go to http://localhost:8080


6) Version 5.2: You will find some sample data in your portal. Login as any of the users
already created (you will find their credentials in the welcome page of the portal). The user
with administration privileges has the following credentials:
● Email address: [email protected]
● Password: bruno
If you remove 7Cogs sample data, then the user with administration privileges will be
[email protected] and password test.
Version 5.1 and earlier: Login as user [email protected] and password test This user has
all administration privileges..
7) New in Version 5.2: Control Panel consolidates Administration portlets into one
interface: If you are looking for the administration portlets, you'll find them in the "Control
Panel," which is one of the menu items in the dock in the upper right.

Next Steps
While the instructions above are enough to get the system up and running you may want to
perform some further configuration steps such as:
● Installing plugins from the official repository or the community repository
● Configure Liferay Portal to use a production-ready database instead of the default
HSQLDB
● Configure they system to access mail servers for sending and receiving emails
(changed in version 5.2)
● Fine tune the performance of the system
● Find out how to install Liferay Portal in other application servers
● Remove 7Cogs sample data
You can find information about how to do this and much more in the Portal Administrators
Guide (Version 5.1) (or Version 4.4. 5.2 is not yet available as of March 9, 2009). You can
buy the print back book or download the PDF for free!!

Installing GlassFish from a JAR file


In response to the comments below, the following are general instructions for installing
GlassFish from a JAR file.
To install and configure GlassFish, you need to have JDK 5 or JDK 6 installed on your
system. The configuration processing depends on Ant (1.6.5). The bundle includes an Ant
distribution that has been extended with tasks to facilitate developing Java EE 5 applications
for the application server.
1. Download one of the bundles to disk, set JAVA_HOME to the JDK you have installed on
your system.

2. Run the GlassFish installer:

java -Xmx256m -jar <filename>.jar

This command will unbundle GlassFish and create a new directory structure rooted
under a directory named 'glassfish'.

>> If you encounter out-of-memory errors during installation, specify larger initial
and maximum memory heap sizes; for example:

java -Xms512m -Xmx1024m -jar <filename>.jar

3. Change to the new GlassFish directory:

cd glassfish

4. If you are using a machine with an operating system that is a derivative of UNIX(tm),
set the execute permission for the Ant binaries that are included with the GlassFish
bundle.

chmod -R +x lib/ant/bin

5. Run the Ant setup script:

lib/ant/bin/ant -f setup.xml

OR for Windows:

lib\ant\bin\ant -f setup.xml

>> For GlassFish V2 UR2 with clustering support, use the setup-cluster script instead:

lib/ant/bin/ant -f setup-cluster.xml

OR for Windows:

lib\ant\bin\ant -f setup-cluster.xml

Learning more and getting support


For a complete guide on installation and setup options check the main documentation pages
of Liferay Portal. Also, when available check the "Liferay Portal Administration Guide". The
latest version at the time of writing is for Liferay Portal v5.1 so things may vary slightly if
you are using 5.2. If that's the case be sure to check Database Configuration for updated
instructions on how to setup the connection to the database.
If you are having problems with the instructions here you can use the Installation /
Deployment / Setup category in the forum for free community support. If you prefer
professional support you can ask for more details by following this link

Children Pages

● Fine tune the performance of the system


● Installing and Configuring Open Office
203855 Views , 0 Attachments

Average (0 Votes)

I'm working in Windows at the moment ...


Looks...
Bill Hazard
3/15/09 12:28 PM
I'm working Ubuntu LTS and it seems to work
better...
Lisa Simpson
7/6/09 10:26 AM

And I forgot to add that if you're planning to


use...
Lisa Simpson
7/6/09 10:28 AM

I'm Working on Ubuntu Linux, I want to


upgrade my...
Rajesh Nivrutti Ugale
7/6/09 2:35 AM

glassfish version on OSX boots out of the


box :) ...
Ries Twisk
9/23/09 7:26 PM

Liferay is a beautiful product. The...


jan kuba van bijnen
10/28/09 12:56 PM

I've encountered some problems while


installing...
Anna Galkina
11/19/09 6:28 AM

Comments

I'm working in Windows at the moment ...


Looks like the 5.2 w/ Tomcat distro also
needs CATALINA_HOME set. This will
normally be <liferay-home>/tomcat-5.5.27.

Bill Hazard Posted on 3/15/09 12:28 PM.

● ±0 Top
● (0 Votes)   Sign
in to vote.

I'm Working on Ubuntu Linux, I want to


upgrade my ext environment (LR 5.2.2)
which contains customize code to LR 5.2.3
how can i proceed? so that the upgrade will
not affect to my customized code.
Can anybody please give me step by step
Rajesh Nivrutti Ugale instructions ??

Posted on 7/6/09 2:35 AM.

● ±0 Top
● (0 Votes)   Sign
in to vote.

I'm working Ubuntu LTS and it seems to work


better with CATALINA_HOME,
CATALINA_BASE, CATALINA_TMPDIR and
JRE_HOME all set in addition to the
JAVA_HOME. We see a small performance
improvement from doing this instead of
making the server fetch it/figure it out.
Lisa Simpson
Posted on 7/6/09 10:26 AM in reply to Bill
Hazard.

● ±0 Top
● (0 Votes)   Sign
in to vote.
And I forgot to add that if you're planning to
use a "real" database like Postgres or MySQL,
you'll have to do more than this to get it
working. "Next Steps" really ought to include
the pointer to the database configuration
stuff.
Lisa Simpson
Posted on 7/6/09 10:28 AM in reply to Lisa
Simpson.

● +1 Top
● (1 Vote)   Sign
in to vote.

glassfish version on OSX boots out of the box

thumbs up

Ries Twisk Posted on 9/23/09 7:26 PM.

● ±0 Top
● (0 Votes)   Sign
in to vote.

Liferay is a beautiful product.


The Liferay/Tomcat 5.5 installation works out
of the box on OpenSolaris (with standard Java
6), so I expect it to work on Solaris eXpress
Community Edition too.
jan kuba van bijnen Later on I 'll check Liferay working on Solaris
10.
But first there is a lot of exploring to do, since
Liferay is quite new to me.

I 'll make some notes of my UNIX specific


Liferay adventures and share some manualish
things from time to time.

Thanks, Kuba

Posted on 10/28/09 12:56 PM.

● ±0 Top
● (0 Votes)   Sign
in to vote.

I've encountered some problems while


installing liferay 5.2.3 on windows - it failed
with the following errors

19-Nov-2009 14:25:07
Anna Galkina org.apache.catalina.core.StandardContext
start
SEVERE: Context [] startup failed due to
previous errors
19-Nov-2009 14:25:10
org.apache.catalina.loader.WebappClassLoade
r loadClass
INFO: Illegal access: this web application
instance has been stopped already. Could not
load org.apache.log4j.spi.LocationInfo. The
eventual following stack trace is caused by an
error thrown for debugging purposes as well
as to attempt to terminate the thread which
caused the illegal access, and has no
functional impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoade
r.loadClass(WebappClassLoader.java:1273)
at
org.apache.catalina.loader.WebappClassLoade
r.loadClass(WebappClassLoader.java:1233)
at
java.lang.ClassLoader.loadClassInternal(Class
Loader.java:319)
at
org.apache.log4j.spi.LoggingEvent.getLocatio
nInformation(LoggingEvent.java:247)
at
org.apache.log4j.helpers.PatternParser$Locati
onPatternConverter.convert(PatternParser.jav
a:483)
at
org.apache.log4j.helpers.PatternConverter.for
mat(PatternConverter.java:65)
at
org.apache.log4j.PatternLayout.format(Patter
nLayout.java:502)
at
org.apache.log4j.WriterAppender.subAppend(
WriterAppender.java:302)
at
org.apache.log4j.WriterAppender.append(Writ
erAppender.java:160)
at
org.apache.log4j.AppenderSkeleton.doAppend
(AppenderSkeleton.java:251)
at
org.apache.log4j.helpers.AppenderAttachableI
mpl.appendLoopOnAppenders(AppenderAttac
hableImpl.java:66)
at
org.apache.log4j.Category.callAppenders(Cat
egory.java:206)
at
org.apache.log4j.Category.forcedLog(Categor
y.java:391)
at
org.apache.log4j.Category.log(Category.java:
856)
at
com.liferay.portal.log.Log4jLogImpl.info(Log4j
LogImpl.java:80)
at
com.liferay.portal.kernel.log.LogWrapper.info(
LogWrapper.java:124)
at
com.liferay.portal.kernel.deploy.hot.HotDeplo
yEvent.initDependentServletContextNames(H
otDeployEvent.java:108)
at
com.liferay.portal.kernel.deploy.hot.HotDeplo
yEvent.<init>(HotDeployEvent.java:57)
at
com.liferay.portal.kernel.servlet.HookContext
Listener.contextInitialized(HookContextListen
er.java:47)
at
org.apache.catalina.core.StandardContext.list
enerStart(StandardContext.java:3843)
at
org.apache.catalina.core.StandardContext.sta
rt(StandardContext.java:4342)
at
org.apache.catalina.core.ContainerBase.addC
hildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addC
hild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addCh
ild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deploy
Directory(HostConfig.java:926)
at
org.apache.catalina.startup.HostConfig.deploy
Directories(HostConfig.java:889)
at
org.apache.catalina.startup.HostConfig.deploy
Apps(HostConfig.java:492)
at
org.apache.catalina.startup.HostConfig.start(
HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecyc
leEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLi
fecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1053)
at
org.apache.catalina.core.StandardHost.start(
StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.star
t(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.star
t(StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start
(StandardServer.java:710)
at
org.apache.catalina.startup.Catalina.start(Cat
alina.java:578)

until I removed

if not "%JAVA_HOME%" == "" (


set JAVA_HOME=
)

from the bin/setenv.bat. After that it worked


fine. May be this will save time with
configuration/researching for somebody

Posted on 11/19/09 6:28 AM.

● ±0 Top
● (0 Votes)   Sign
in to vote.

You might also like