The easiest way to install Liferay DXP is to use a bundle. However, this is not always possible. Some organizations have an existing infrastructure into which Liferay DXP must be installed. Other organizations have standardized on a particular application server. Liferay DXP works well with many leading application servers. Before you get started, note that there are two distinct approaches to managing Liferay DXP’s data source and mail session. All these topics are covered:
Start with data sources.
Liferay DXP provides two ways to configure your data source:
- Use Liferay DXP’s built-in data source
- Use your application’s server’s JNDI data source
We recommend the built-in data source. Liferay DXP’s data source is configured
by properties set in a properties file. By default, you can enter database
connection information on the
Basic Configuration page
that appears when Liferay DXP starts for the first time. The Setup Wizard stores
the information you entered in a configuration file called
portal-setup-wizard.properties in your
folder. The built-in data source uses this information to connect to the
Although using the built-in data source is recommended, that’s not the only option. You might prefer to use the data source your application server provides. In this case, a JNDI lookup provides a handle to the data source and the application server manages the connection pools.
To configure your application server’s data source, you must create your own configuration file and skip the setup wizard. Since you’d be creating this file after the wizard anyway, this isn’t a big deal. The Manual Configuration section below demonstrates configuring a JNDI data source.
Since mail sessions are configured similarly to data sources, they’re next.
Liferay DXP uses SMTP to send mail. As with databases, you have two ways to configure your mail server:
- Use Liferay DXP’s built-in mail session
- Use your application server’s mail session
Using the built-in mail session is recommended. After you’ve started Liferay DXP,
you can configure a mail server through the Control Panel. The default
configuration is a mail server on the same machine running Liferay DXP. If this is
not your configuration, you must modify the defaults. To do this, use
portal-ext.properties file in your Liferay Home folder (see below).
To use your application server’s mail session, you must create it in your
application server. Once you’ve created a mail session, you can point Liferay DXP
to it through your
portal-ext.properties file or through the Control Panel.
If you plan to use Liferay DXP to manage both your database connection and mail session, enter your database connection information on the Basic Configuration page when Liferay DXP first starts, and then enter your mail server information through the Control Panel.
If you plan to let your application server manage your database connection or your mail server, you can’t use Liferay DXP’s setup wizard: you must follow the instructions in the Manual Configuration section below.
The installation articles for each application server also include instructions for configuring your application server to manage the database connection and mail server.
To have your application server manage your database connection or mail server
(or both), you must manually create this configuration. Create a text file
portal-ext.properties in your Liferay Home folder. This file overrides
the default properties.
To use your application server’s data source, create a connection pool in your
application server that points to your database. The connection pool should be
jdbc/LiferayPool. This is spelled out for each application server in
its article. To tell Liferay DXP to use your
jdbc/LiferayPool connection pool,
add the following directive to your
Next, install Liferay DXP according to the article for your application server. Once it’s installed, you can set up the mail configuration.
You should use the Control Panel to create the mail configuration. Go to Control Panel → Configuration → Server Administration → Mail and enter your settings for your mail session settings.
You can also configure this with the
portal-ext.properties file, which lets
you do the configuration once and then copy the configuration file to multiple
machines. To use the built-in mail session, use the following properties and
customize their values for your environment:
To use your application server’s mail session, create it first. Then specify it
When you’re finished, save the file.
After deploying Liferay DXP, you may see excessive warnings and log messages, such
as the ones below, involving
PhaseOptimizer. These are benign and can be
ignored. Make sure to adjust your app server’s logging level or log filters to
avoid excessive benign log messages.
WARNING: Skipping pass gatherExternProperties
WARNING: Skipping pass checkControlFlow
INFO: pass supports: [ES3 keywords as identifiers, getters, reserved words as properties, setters, string continuation, trailing comma, array pattern rest, arrow function, binary literal, block-scoped function declaration, class, computed property, const declaration, default parameter, destructuring, extended object literal, for-of loop, generator, let declaration, member declaration, new.target, octal literal, RegExp flag 'u', RegExp flag 'y', rest parameter, spread expression, super, template literal, modules, exponent operator (**), async function, trailing comma in param list]
current AST contains: [ES3 keywords as identifiers, getters, reserved words as properties, setters, string continuation, trailing comma, array pattern rest, arrow function, binary literal, block-scoped function declaration, class, computed property, const declaration, default parameter, destructuring, extended object literal, for-of loop, generator, let declaration, member declaration, new.target, octal literal, RegExp flag 'u', RegExp flag 'y', rest parameter, spread expression, super, template literal, exponent operator (**), async function, trailing comma in param list, object literals with spread, object pattern rest]