Installing Liferay DXP on tc Server

Installing Liferay DXP on tc server requires these Additional Files for DXP or Portal CE::

  • Liferay DXP WAR file
  • Dependencies ZIP file
  • OSGi Dependencies ZIP file

Liferay DXP requires a Java JDK 8 or 11.

Here are the basic steps for installing Liferay DXP on tc Server:

  • Installing Liferay DXP dependencies to your application server

  • Configuring your application server for Liferay DXP

  • Deploying the Liferay DXP WAR file to your application server

Creating a tc Server

  1. Download and unzip a tc Server, available here. This is referred to as [TCSERVER_INSTANCE_HOME].

  2. Create a folder called servers inside [TCSERVER_INSTANCE_HOME]. (e.g. /opt/pivotal-tc-server/servers). This folder becomes Liferay Home (see note above), and you should not confuse the two.

  3. Next, create an instance called dxp-server to deploy Liferay DXP. Navigate to the [TCSERVER_INSTANCE_HOME]/developer-4.0.0.RELEASE folder and run this command:

    tcserver create -i ../servers dxp-server

    By default, new instances are created in the [TCSERVER_INSTANCE_HOME]/instances folder. The -i specifies where to create the folder. The instance location can also be changed via a properties file. See the tc Server documentation for more information.


  1. A new folder called servers has been created.

  2. A new folder called dxp-server has been created inside the servers folder. The following folders have been created inside the dxp-server folder:

    • bin
    • conf
    • lib
    • logs
    • temp
    • webapps
    • work

Next you can install the required dependencies.

Installing Liferay DXP Dependencies

Liferay DXP depends on additional JARs that aren’t included with tc Server by default. There are even more JARs that you’d find in a Liferay DXP bundle that are not required but can be useful. If you don’t have a Liferay DXP bundle, you can download the required JARs from third parties, as described below.

  1. Extract the JARs from the dependencies ZIP to the [TCSERVER_INSTANCE_HOME]/servers/dxp-server/lib folder.

  2. Download the following JARs or copy them from a Liferay DXP bundle to the [TCSERVER_INSTANCE_HOME]/servers/dxp-server/lib folder:

  3. Download a database driver .jar file and copy it to the [TCSERVER_INSTANCE_HOME]/servers/dxp-server/lib folder. For a list of supported databases, see Liferay’s compatibility matrix

  4. Create an osgi folder in your Liferay Home. Extract the folders (i.e., configs, core, and more) from OSGi ZIP file to the osgi folder. The osgi folder provides the necessary modules for Liferay DXP’s OSGi runtime.

Configuring tc Server

There are a few configuration edits to make so Liferay DXP runs well on tc Server. All of these configuration changes should be made in your tc Server runtime instance.

  1. Navigate to the [TCSERVER_INSTANCE_HOME]/servers/dxp-server/bin folder. In replace this line:

    JVM_OPTS="-Xmx512M -Xss256K"

    with this one

    JVM_OPTS="-Dfile.encoding=UTF-8 -Duser.timezone=GMT -Xmx2048M -Xss512K -XX:MaxMetaspaceSize=512m"

    In setenv.bat replace

    set JVM_OPTS=-Xmx512M -Xss256K


    set JVM_OPTS=-Dfile.encoding=UTF-8 -Duser.timezone=GMT -Xmx2048M -Xss512K -XX:MaxMetaspaceSize=512m
  2. Next, you should make sure that UTF-8 URI encoding is used consistently. Open [TCSERVER_INSTANCE_HOME]/servers/dxp-server/conf/server.xml and make sure the Connector tag includes setting the URIEncoding to UTF-8.

    <Connector acceptCount="100"
               URIEncoding="UTF-8" />
  3. If you’re installing Liferay DXP and tc Server on Windows, open [TCSERVER_INSTANCE_HOME]/servers/dxp-server/conf/wrapper.conf and replace


    and add these properties:
  4. Finally, open [TCSERVER_INSTANCE_HOME]/servers/dxp-server/conf/web.xml and add the following configuration after <load-on-startup>3</load-on-startup>:


Database Configuration

The easiest way to handle your database configuration is to let Liferay DXP manage your data source. If you want to use Liferay DXP’s built-in data source, you can skip this section.

If you want tc Server to manage your data source, follow these steps:

  1. Make sure your database server is installed and working. If it’s installed on a different machine, make sure it’s accessible from your Liferay DXP machine.

  2. Add your data source as a resource in the context of your web application specified in [TCSERVER_INSTANCE_HOME]/servers/dxp-server/conf/Catalina/localhost/ROOT.xml (create this file if you don’t have it already). An example configuration is shown below:

    <Context crossContext="true" path="">

    The resource definition above is for a MySQL database named lportalthat has a user named root whose password is root. Replace these values with your own.

  3. In a file in Liferay Home, specify your data source:

Your data source is now configured. Next set up the mail session.

Mail Configuration

As with database configuration, the easiest way to configure mail is to let Liferay DXP handle your mail session. If you want to use Liferay DXP’s built-in mail session, skip this section and configure the mail session in the Control Panel.

If you want to manage your mail session with tc Server, follow these steps:

  1. Edit [TCSERVER_INSTANCE_HOME]/servers/dxp-server/conf/Catalina/localhost/ROOT.xml and add your mail session as a Resource in your web application Context. Make sure to replace the example mail session values with your own.

    <Context crossContext="true" path="">
  2. In your file in Liferay Home, reference your mail session:

You created a mail session for tc Server to manage and configured Liferay DXP to use it.

Deploying Liferay DXP

Now you’re ready to deploy Liferay DXP using your Liferay DXP WAR file.

  1. If you are manually installing Liferay DXP on a clean tc Server instance, delete the contents of the [TCSERVER_INSTANCE_HOME]/servers/dxp-server/webapps/ROOT directory. This removes the default home page.

  2. Extract the Liferay DXP .war file to [TCSERVER_INSTANCE_HOME]/servers/dxp-server/webapps/ROOT.

    Now it’s time to launch Liferay DXP!

  3. Start tc Server by navigating to the runtime instance’s [TCSERVER_INSTANCE_HOME]/developer-4.0.0.RELEASE folder and run the following command:

    tcserver run -i ../servers dxp-server

Congratulations on successfully installing and deploying Liferay DXP on tc Server!

« Installing Liferay DXP on JBoss EAPInstalling Liferay DXP on WebLogic 12c R2 »
Was this article helpful?
0 out of 0 found this helpful