4 min read

Setting up Liferay Portal

As an administrator at the enterprise, you need to undertake a lot of administration tasks, such as installing Liferay portal, installing and setting up databases, and so on.

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.
  • 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 take up the third installation option “Using the extension environment” in the coming section.

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:
      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;
  2. Create a database and account in MySQL:
  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&amp;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: [email protected] 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.

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: [email protected] 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.

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.

Flexible Deployment Matrix

As an administrator, you can install Liferay Portals on all major application servers, databases, and operating systems. There are over 700 ways to deploy Liferay Portal. Thus, you can reuse your existing resources, stick to your budget and get an immediate return on you investment that everyone can be happy with.

In general, you can install Liferay portal in Linux, UNIX and Windows with any one of the following application servers (or Servlet containers) and by selecting any one of the following database systems.

The applications servers (or Servlet containers) that Liferay Portal can run on, include:

  • Borland ES 6.5
  • Apache Geronimo 2.x
  • Sun GlassFish 2 UR1
  • JBoss 4.0.x, 4.2.x
  • JOnAS 4.8.x
  • JRun 4 Updater 3
  • OracleAS 10.1.3.x
  • Orion 2.0.7
  • Pramati 5.0
  • RexIP 2.5
  • SUN JSAS 9.1
  • WebLogic 8.1 SP4, 9.2, 10
  • WebSphere 5.1, 6.0.x, 6.1.x
  • Jetty 5.1.10
  • Resin 3.0.19
  • Tomcat 5.0.x/5.5.x/6.0.x

Databases that Liferay portal can run on include:

  • Apache Derby
  • IBM DB2
  • Firebird
  • Hypersonic
  • Informix
  • InterBase
  • JDataStore
  • MySQL
  • Oracle
  • PostgresSQL
  • SAP
  • SQL Server
  • Sybase

Operating systems that Liferay portal can run on include:

  • LINUX (Debian, RedHat, SUSE, Ubuntu, and so on.)
  • UNIX (AIX, FreeBSD, HP-UX, OS X, Solaris, and so on.)
  • WINDOWS
  • MAC OS X

LEAVE A REPLY

Please enter your comment!
Please enter your name here