Installation Wiki

Installing Liferay Portal

From InstallationWiki

Jump to: navigation, search
Liferay Portal
Official Page
Project Documentation
Download
Source Book
Liferay Portal Enterprise Intranets
Liferay Portal Enterprise Intranets
ISBN 978-1-847192-72-1
Publisher Packt Publishing
Author(s) Jonas X. Yuan

Contents

[edit] Quick Liferay Portal Installation

Let's install Liferays Portal in your local machine quickly, as follows:

Download Liferay Portal Bundled with Tomcat JDK 6.0 from Liferay official web site (http://www.liferay.com). It is a big file and you have to wait long to download it:

  • Unzip the bundled file; run $TOMCAT/bin/startup.bat for Windows or startup.sh for Linux, UNIX, etc.
  • Open your browser and go to http://localhost:8080/user/joebloggs/home.
  • Log in as an administrator using the following data User: test@liferay.com and Password: test.

Congratulations! You now have a running copy of Liferay.

Does it work well? Make sure that you have installed JDK 6.0 or above in your local machine and set JAVA_HOME as well. This is the only one you need in order to install Liferay portal properly.

[edit] Setting up Liferay Portal

You can install Liferay Portal through different ways, based on your specific needs. Normally, there are three main installation options:

  • Using an open source bundle It is the easiest and fastest installation method to install Liferay portal as a bundle. By using a Java SE runtime environment with an embedded database, you simply unzip and run the bundle as we have done in the beginning.
  • Detailed installation procedure You can install the portal in an existing application server. This option is available for all the supported application servers.
  • Using the extension environment You can use a full development environment to extend the functionality.

We will consider, partially, the second installation option "Detailed installation procedure". Meanwhile we will take up the third installation option "Using the extension environment" in the coming section.

In the previous section, we had used the first installation option "Using an open source bundle". Let's experience more details as follows:

[edit] Using Liferay Portal Bundled with Tomcat 5.5 in Windows

First let's consider one scenario when you, as an administrator, need to install Liferay portal in Windows with MySQL database, and your local Java version is JavaSE 5.0. Let's install Liferay portal bundled with Tomcat 5.5 in Windows as follows:

  1. Download Liferay Portal bundled with Tomcat for JDK 5.0 from Liferay official web site.
    • Unzip the bundled file.
    • Set up MySQL database as follows:
  2. Create a database and account in MySQL:
      create database liferay;
      grant all on liferay.* to 'liferay'@'localhost' identified by 'liferay' with grant option;
      grant all on liferay.* to 'liferay'@'localhost.localdomain' identified by 'liferay' with grant option;
    
  3. Copy the MySQL JDBC driver mysql.jar to $TOMCAT_DIR/lib/ext;
  4. Comment the Hypersonic data source (HSQL) configuration and uncomment MySQL configuration ($TOMCAT_DIR/conf/Catalina/localhost/ROOT.xml):
      <!-- Hypersonic -->
      <!--<Resource name="jdbc/LiferayPool" auth="Container"
      type="javax.sql.DataSource" driverClassName="org.hsqldb. jdbcDriver"
      url="jdbc:hsqldb:lportal"
      username="sa"
      password=""
      maxActive="20" /> -->
     
      <!-- MySQL -->
      <Resource name="jdbc/LiferayPool" auth="Container"
      type="javax.sql.DataSource" driverClassName="com.mysql.jdbc. Driver"
      url="jdbc:mysql://localhost/liferay?useUnicode=true&characterE ncoding=UTF-8"
      username="liferay"
      password="liferay"
      maxActive="20" />
    
  5. Run $TOMCAT_DIR /bin/startup.bat.
  6. Open your browser and go to http://localhost:8080 (here we assume that it is a local installation, otherwise use the real host name or IP).
  7. Login as an administrator User: test@liferay.com and Password: test.
Note that the bundle comes with an embedded HSQL database loaded with sample data from the public website of Liferay. Do not use the Hypersonic in production.

[edit] Using Liferay Portal Bundled with Tomcat 6.x in Linux

Let's consider another scenario when you, as an administrator, need to install Liferay portal in Linux with MySQL database, and your local Java version is Java 6.0. Let's install Liferay portal bundled with Tomcat 6.0 in Linux as follows:

  1. Download Liferay Portal bundled with Tomcat 6.0 from Liferay official web site.
  2. Unzip the bundled file.
  3. Create a database and account in MySQL (as stated before).
  4. Run $TOMCAT_DIR/bin/startup.sh.
  5. Open your browser and go to http://localhost:8080 (assuming local installation; otherwise use the real host name or IP).
  6. Log in as an administrator User: test@liferay.com and Password: test.
Note that, Liferay Portal creates the tables it needs along with example data, the first time it starts. Furthermore, it is necessary to make the script executable by running chmod +x filename.sh. It is often necessary to run the executable from the directory where it resides.

[edit] Using More Options for Liferay Portal Installation

You can use one of the following options for Servlet containers and full Java EE application servers to install Liferay Portal:

  • Geronimo + Tomcat
  • Glassfish for AIX
  • Glassfish for Linux
  • Glassfish for OSX
  • Glassfish for Solaris
  • Glassfish for Solaris (x86)
  • Glassfish for Windows
  • JBoss + Jetty 4.0
  • JBoss + Tomcat 4.0
  • JBoss + Tomcat 4.2
  • Jetty
  • JOnAS + Jetty
  • JOnAS + Tomcat
  • Pramati
  • Resin
  • Tomcat 5.5 for JDK 1.4
  • Tomcat 5.5 for JDK 5.0
  • Tomcat 6.0

You can choose a preferred bundle according to your requirements and download it from the official download page directly. Simply go to the website http://www.liferay.com and click on Downloads page.

[edit] Source

The source of this content is Chapter 2: Set-up The Home Page And Navigation Structure for The Intranet of Liferay Portal Enterprise Intranets by Jonas X. Yuan (Packt Publishing, 2008).