Child pages
  • Configuring Portals - Liferay
Skip to end of metadata
Go to start of metadata

Geronimo does not provide any portal server capabilities out of the box. The Geronimo Administration Console is a web application that has Apache Pluto already embedded within the application itself for portlets support, this does not mean that Geronimo per se is a portal server.

The Geronimo Administration Console is the one providing Pluto integration within it's own WAR. All the portal configurations ( navigation, layout, available portlets, etc. ) are already provided inside that WAR via XML files.

So, if you want to run portlets in Geronimo you could do the same, embed Apache Pluto within your own WAR, but there is also another alternative. You could install on Geronimo a full portal server such as Liferay.

Liferay is available as a Geronimo Plugin (Geronimo-Tomcat distribution only) and you can install it via the Geronimo Administration Console or a command line. This portal server comes in two separate plugins, one needs to installed before the other. That is the server plugin will require the database a connection pool to be created first.

The Liferay plugin will use the Geronimo embedded Derby database but you may want to choose a different platform. Later on in this article we will describe how to configure a MySQL database and connection pool.

Install Liferay plugin via Geronimo Administration Console

For this scenario we will use just the default database so you can see how simple the process can be.

  • Once in the Geronimo Administration Console locate Plugins and click on Create/Install on the left navigation menu.
  • Click on Add Repository.
  • Add this URL :
  • Now select that URL from the drop down list and click the Search for Plugins button
  • Install and start the liferay-pool plugin (this is the database and connection pool for Liferay)
  • Install and start the liferay-portal-tomcat plugin
  • Your portal should now be accessible at http://localhost:8080/ (it may take a few seconds to load the first time)

Congrats! you now have a portal server running on Geronimo, check Liferay Documentation for details on how to configure the portal server.

Install Liferay plugin via command line

In the previous section you saw how easy is to install the plugins from the console. Using the command line is just as easy, but this time we will download the plugin manually first and then create a custom connection pool to use an external database.

Download the plugin from , look into the Application Server Plugins section. You should find something similar to this:

Geronimo: (be sure you install first)

For this particular case, Liferay portal 4.2.1 for Geronimo Tomcat distribution.

We mentioned earlier that we would use a different database for this example so now we will provide additional steps for configuring the remote database. We assume you have already installed MySQL 5.

Create database schema and populate initial data

  • Download and extract the database schema scripts available on , see Database Scripts.
  • Create and populate the portal database, for this particular case we will be using create-mysql.sql.
    from a MySQL command line client run

    \. <scripts_home>\create\create-mysql.sql

    Note that this command may take some time to run. This concludes the initial database configuration, now we need to define a connection pool in Geronimo.

Create the required database connection pool

Liferay portal server plugin will be expecting to find a connection pool named LiferayPool and with the following moduleId liferay/liferay-pool/4.2.1/car. So we will create a deployment plan and deploy this connection pool from the command line.

Before we can deploy the connection pool we need to install in Geronimo the appropriate MySQL connector drivers. This is a simple task to do, follow these steps from the Geronimo Administration Console:

  • Download the mysql-connector-java from the MySQL Downloads site. For this particular case we will be using mysql-connector-java-5.0.5-bin.jar.
  • From the Geronimo Administration Console click on Common Libs.
  • Click on Browse and specify the location for the mysql-connector-java-5.0.5-bin.jar file you just downloaded.
  • Make sure the remaining fields reflect the following values:









  • Click on Install, this will copy the drivers into the local Geronimo repository.

Now we are ready for the next step, deploy the connection pool.

Create a deployment plan named liferay-pool_mysql.xml as shown in the following example.

xmlliferay-pool_mysql.xmlsolid liferay liferay-pool 4.2.1 car mysql mysql-connector-java 5.0.5 jar javax.sql.DataSource LiferayPool password com.mysql.jdbc.Driver root jdbc:mysql://localhost:3306/lportal 10 0 ]]>

Make sure you update ConnectionURL, UserName and Password to your local values before deploying the plan.

Deploy the connection pool by running the following command from the <geronimo_home>/bin directory:

deploy --user system --password manager deploy <plans_home>\liferay-pool_mysql.xml ..\repository\tranql\tranql-connector\1.2\tranql-connector-1.2.rar

You should see a confirmation message similar to this one:

#000000soliddeploy --user system --password manager deploy \plans\liferay-pool_mysql.xml ..\repository\tranql\tranql-connector\1.2\tranql-connector-1.2.rar Using GERONIMO_BASE: D:\geronimo-1.1.1-Tomcat Using GERONIMO_HOME: D:\geronimo-1.1.1-Tomcat Using GERONIMO_TMPDIR: D:\geronimo-1.1.1-Tomcat\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\ Deployed liferay/liferay-pool/4.2.1/car ]]>

Install the server plugin

With the server plugin requirements fulfilled run the following command to install and start the Liferay portal server.

deploy --user system --password manager install-plugin <Liferay_plugin_home>/

Installing a downloaded copy of the plugin from the command line may require you to first uninstall the Welcome application in order to avoid a conflict at the web server's context root ('/'). Installing the plugin from a plugin repository employs a feature of the plugin installer that automatically uninstalls the Welcome application for you.

This step may take some time to run, when finished you should see a confirmation message similar to this one:

#000000soliddeploy --user system --password manager install-plugin \Liferay\ Using GERONIMO_BASE: D:\geronimo-1.1.1-Tomcat Using GERONIMO_HOME: D:\geronimo-1.1.1-Tomcat Using GERONIMO_TMPDIR: D:\geronimo-1.1.1-Tomcat\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\ Checking for status every 1000ms: null (7%) null (8%) null (9%) null (10%) null (11%) null (12%) null (13%) null (14%) null (23%) null (27%) null (31%) null (34%) null (38%) null (42%) null (45%) null (46%) null (50%) null (54%) Finished installing liferay/liferay-portal-tomcat/4.2.1/car (65365 kB) (100%) **** Installation Complete! Used existing: geronimo/j2ee-server//car Used existing: geronimo/j2ee-security//car Used existing: geronimo/rmi-naming//car Used existing: geronimo/geronimo-mail//jar Used existing: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec//jar Used existing: liferay/liferay-pool//car Used existing: geronimo/tomcat//car Downloaded 65365 kB in 38s (1720 kB/s) Now starting liferay/liferay-portal-tomcat/4.2.1/car... Started liferay/liferay-portal-tomcat/4.2.1/car @ http://localhost:8080/ ]]>

The Geronimo terminal should also display a message similar to this one:


Once started it should have created a \home\liferay\deploy directory on the same drive/file system where Geronimo resides. This directory can be used to deploy portlets and templates from the command line.

You can now access the Liferay portal server by pointing your browser to the following URL:


Note that it may take some time the first time you access the server. Refer to the Liferay documentation available at for details on how to configure the server.


This article showed two different ways to install a Geronimo plugin as well as an alternative configuration for the Liferay portal server plugin for Geronimo.
This article is not intended to provide detailed instructions for configuring and using Liferay, instead the focus is on configuring Geronimo to support Liferay.

  • No labels