« Back to Installation

Quick Installation Instructions

Alternative Languages: 日本語 <<TableOfContents>>

Introduction #

This guide helps you to set up and run a Liferay Tomcat bundle. It is geared toward beginners to Liferay. If you are planning on using the bundle for anything other than demo, please complete these steps but also Database Configuration and remove 7Cogs sample data afterwards! It is very important that you do these things because otherwise you can lose all your data.

Prerequisites #

  • Hardware - 1GB RAM
  • Java 6 or later for Linux or Mac. Windows users don't need to install Java, as JRE is bundled.

Java Install #

Ubuntu #

Linux users need to install Java. Ubuntu users can easily install java by using the terminal and typing:

sudo apt-get install sun-java6-jdk

If you use another Linux distro, you need to find the equivalent command for your package manager.

Mac OSX #

Apple Computer supplies their own version of Java. Use the Software Update feature (available on the Apple menu) to check that you have the most up-to-date version of Java for your Mac.

Easy Liferay Installation #

1) Download the desired bundle from http://www.liferay.com/downloads/liferay-portal. Tomcat bundle is recommended, and it is what this guide uses.

2) Unzip the package into a directory.

3) Open the command line and run:

Windows:
C:/{directory}/liferay-{version}/tomcat-{version}/bin catalina.bat run

Linux/OSX: cd /{directory}/liferay-{version}/tomcat-{version}/bin ./startup.sh }}}

Windows users can also go to the directory and double-click "startup.bat" to run.

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

5) Look at the server console until you see something like the following:

INFO: Server startup in 42950 ms

5) Open a browser and go to http://localhost:8080. Congratulations, you are now running Liferay Portal!

Next Steps #

Default Usernames and Passwords #

From Liferay 5.2.x+, you will find some sample data in the portal. The user with administration privileges has the following credentials:

* Email address: //bruno@7cogs.com//
* Password: //bruno//

If you remove [[7Cogs sample data]], then the user with administration privileges will be: 
* Email address: //test@liferay.com// 
* Password: //test//  

From Liferay 5.1.x and lower, then the user with administration privileges will be:
* Email address: //test@liferay.com// 
* Password: //test// 

Other Documentation #

For a complete guide on installation and setup options check the Official Documentation. Also, when available check the "Liferay Portal Administration Guide," which is the official documentation for Liferay Portal.

Troubleshooting #

If your Liferay won't start after clicking startup.bat maybe it can't find Java. Open in notepad file {tomcat-home}/bin/setenv.bat and point JRE_HOME to folder where you installed Java. You setenv.bat should look like this:

set "JRE_HOME=C:\Program Files\Java\jre6"
set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"

If it works you should check again your Java installation.

Support #

Children Pages

0 Attachments
413699 Views
Average (3 Votes)
Comments

Showing 18 Comments

Bill Hazard
3/15/09 12:28 PM

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.

Rajesh Nivrutti Ugale
7/6/09 2:35 AM

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 instructions ??

Lisa Simpson
7/6/09 10:26 AM

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
7/6/09 10:28 AM

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.

Ries Twisk
9/23/09 7:26 PM

glassfish version on OSX boots out of the box emoticon

thumbs up

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

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.
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

Anna Galkina
11/19/09 6:28 AM

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 org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
19-Nov-2009 14:25:10 org.apache.catalina.loader.WebappClassLoader 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.WebappClassLoader.loadClass(WebappClassLoader.java:12­73)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:12­33)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.apache.log4j.spi.LoggingEvent.getLocationInformation(LoggingEvent.java:247)
­at org.apache.log4j.helpers.PatternParser$LocationPatternConverter.convert(PatternP­arser.java:483)
at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:502)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:302)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAt­tachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at com.liferay.portal.log.Log4jLogImpl.info(Log4jLogImpl.java:80)
at com.liferay.portal.kernel.log.LogWrapper.info(LogWrapper.java:124)
at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextN­ames(HotDeployEvent.java:108)
at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:5­7)
at com.liferay.portal.kernel.servlet.HookContextListener.contextInitialized(HookCon­textListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843­)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
­at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at­ org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.ja­va: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.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.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 emoticon

Joseph Vychtrle
2/12/10 8:25 PM

I have an issue with multiple tomcat instances. I was building 5.3 from source and deployed it to tomcat. I left there only /webapp, /lib/ext, conf/server.xml, and modified /bin/startup.sh&shutdown.sh script for having different $CATALINA_BASE. I setup server.xml for connector to listen on different IP and changed hostname.

/opt/jdk1.6.0_16/bin/java -Dnop Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms766m -Xmx1024m -XX:MaxPermSize=512m -Djava.endorsed.dirs=/opt/aaa/apache-tomcat-6.0.20/endorsed -classpath :/opt/aaa/apache-tomcat-6.0.20/bin/bootstrap.jar -Dcatalina.base=/opt/apache-tomcat-6.0.20 -Dcatalina.home=/opt/aaa/apache-tomcat-6.0.20 -Djava.io.tmpdir=/opt/apache-tomcat-6.0.20/temp org.apache.catalina.startup.Bootstrap start

It boots up, listens on that IP and port, but doesn't respond at all, it's like the requests get lost and doesn't even get logged.

Please help, I'm going crazy

Joseph Vychtrle
2/13/10 9:21 AM

I forgot to change common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/l­ib/ext/*.jar in catalina.properties to {catalina.base}/lib/ext/*.jar

Henning Sprang
4/28/10 9:35 AM

one thing that might be interesting to tell:

If you download the jetty package (I did now for the first time, because it's smaller than the tomcat package), you have to go into the jetty bin directory, e.g. "jetty-6.1.23/bin" for liferay 6.0.1 and run "run.sh" from there - otherwise the start.jar is not found.

It might be helpful for beginners to get started easier to add a start script in the top level of the distribution archive

Nathaniel Patterson
6/28/10 6:57 AM

For installation on a server (liferay 6.0.2 with tomcat), is Apache web server required for proper functionality?

Thanks,

Alex Filippovich
7/7/10 3:37 AM

Liferay 5.2 + Glassfish instalation
Download liferay-portal-glassfish-windows-5.2.3.jar

Do next:

1. Run CMD (Command line)
cmd>java -Xms512m -Xmx1024m liferay-portal-glassfish-windows-5.2.3.jar

2. After it will installed
cmd>cd glassfish

3. Then settup
cmd>ant -f setup.xml

If ANT is not present in your system then do next:
cmd>lib\ant\bin\ant -f setup.xml

4. Run
cmd>cd bin
cmd>asadmin.bat start-domain

If after install u will see error in console:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.


do next:

Windows enviroment:
JAVA_OPTS = -Xms1024m -Xmx1024m -XX:MaxPermSize=128m
_JAVA_OPTIONS = -Xmx32m

restart OS

or try it in console by next:

set JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=128m
set _JAVA_OPTIONS=-Xmx32m

and next:
asadmin.bat start-domain

good luck ;)

Alex Filippovich
7/7/10 5:00 AM

by the way, if you allready will have problem to start server tra next configuration:

in command line:
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m

edit file: ../glassfish/domains/domain1/config/domain.xml

find line: <java-config
and edit tag with new:

<java-config classpath-suffix="" debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" env-classpath-ignored="true" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath="">
<!-- various required jvm-options -->
<jvm-options>-XX:MaxPermSize=128m</jvm-options>
<jvm-options>-client</jvm-options>
<jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</jvm-o­ptions>
<jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.po­licy</jvm-options>
<jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/confi­g/login.conf</jvm-options>
<jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
<jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
<jvm-options>-Xms512m</jvm-options>
<jvm-options>-Xmx1024m</jvm-options>
<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystor­e.jks</jvm-options>
<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacer­ts.jks</jvm-options>
<jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${c­om.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib­/ext${path.separator}${com.sun.aas.derbyRoot}/lib</jvm-options>
<jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
<jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.admin.server.­core.jmx.AppServerMBeanServerBuilder</jvm-options>
<jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.su­n.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
<jvm-options>-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar</jvm-opt­ions>
<jvm-options>-Dcom.sun.enterprise.taglisteners=jsf-impl.jar</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<!--
Use the following jvm-options element to disable the quick startup:
com.sun.enterprise.server.ss.ASQuickStartup=false
-->
</java-config>

hope it will help you ;)

Rajesh R
7/14/10 10:35 PM

Hi Nathaniel Patterson,

My PC have jdk1.5.o and jdk1.6.0_21(C:\Program Files\Java) versions and jre1.5.0,jre1.6.0_20 and jre1.6.0_21.(C:\Program Files\Java) and Tomcat 5.5(C:\Program Files\Apache Software Foundation\Tomcat 5.5)


In My PC the User variables settings were like bellow:

1. CATALINA_HOME - C:\Program Files\Java\jdk1.5.0\bin;

2. CLASSPATH - C:\Program Files\Java\jdk1.5.0\bin;C:\Program Files\Java\jdk1.5.0\lib;C:\Program Files\Java\jdk1.5.0\lib\servlet-api.jar;C:\Program Files\Java\jdk1.5.0\lib\tools.jar;C:\Program Files\Java\jdk1.5.0\lib\servlet-api.jar;C:\Program Files\Java\jdk1.5.0\lib\jsp-api.jar;

3. JAVA_HOME - C:\Program Files\Java\jdk1.5.0

4. PATH - %JAVA_HOME%\bin;


Now i have extract the liferay-portal-6.0.2 into the this location(C:\Program Files\Apache Software Foundation).

Now i have dpuble click the startup.bat file in the location of the (C:\Program Files\Apache Software Foundation\liferay-portal-6.0.2\tomcat-6.0.26\bin).

Is it process what i have done as above?
Can you suggest me what can i do next.

webmeiker webmeiker
8/23/10 1:59 AM

Official Documentation link (in Other Documentation) doesn't works.

Viresh Makanjee
1/26/11 11:23 PM

Hi,
I am trying to install Liferay on IIS with a SQL 2008 database. I have used the budled Tomcat version in the past and have created a complete website but now need to take it over to a production server using IIS. What do I need to do in order to make it work properly? Any help would be appreciated. emoticon

patrice Louis VERIN
7/4/11 10:29 AM

Hi Viresh,

did you get any answer to you question ?
have you set your production environment ?
If yes, i would appriciate any suggestion on how to do this the right way.

thanks in advance

Oliver James
8/22/11 4:49 AM

I am trying out Liferay for the first time, to test for my business, but I cant login on the default user bruno@7cogs.com ! I have carefully read the instructions (I think) and for the life of me I just cant login to the default instance. What is going on here?