Version

    Apache Tomcat

    Installation of Apache Tomcat
    Apache Tomcat as a Windows Service
    Apache Tomcat on IBM AS/400 (iSeries)
    Installation of CloverDX Server
    Configuration of CloverDX Server on Apache Tomcat
    [Important]Important

    Before installation, check the software requirements, currently supported Apache Tomcat version and required Java version in the Software Requirements section.

    If you encounter any problems during the installation, see Chapter 10, Troubleshooting for a possible solution.

    Installation of Apache Tomcat

    1. Download the binary distribution: Tomcat 8.5 or Tomcat 9.

    2. Extract the downloaded archive (zip or tar.gz).

    3. Set up JAVA_HOME to point to the correct Java version:

      • Unix-like systems:

        Setup the path in /etc/profile or /etc/bash.bashrc:

        export JAVA_HOME=/path/to/JDK

      • Windows system:

        Under System Variables in Advanced System Settings, create a new variable named JAVA_HOME. The value should contain the path to the JDK installation directory.

    4. Run Tomcat:

      • Unix-like systems:

        Run the [Tomcat_home]/bin/startup.sh file.

      • Windows system:

        Run the [Tomcat_home]\bin\startup.bat file.

    Continue with:  Installation of CloverDX Server.

    Apache Tomcat as a Windows Service

    1. Download the 32-bit/64-bit Windows Service Installer file in the Binary Distributions section on the Tomcat 8.5 or Tomcat 9 download page.

    2. Use the standard installation wizard to install Apache Tomcat.

    3. When Tomcat is installed as a Windows service, CloverDX is configured by one of the following options:

      1. Graphical configuration utility
        • Run the [Tomcat_home]\bin\Tomcat9w.exe file.

        • In the Apache Tomcat Properties dialog box, select the Java tab and set the initial and maximum heap size in Initial memory pool and Maximum memory pool fields to 512MB and 1024MB respectively. Other configuration parameters can be defined in Java Options field, being separated by new line.

        • Click on Apply and restart the service.

          [Note]Note
          The Java tab allows you to use alternative JVM by setup of path to jvm.dll file.
      2. Command Prompt tool
        • Run the [Tomcat_home]\bin\Tomcat9.exe file.

        • If Tomcat is running, navigate to [Tomcat_home]\bin and stop the service by typing:

          .\Tomcat9.exe //SS//Tomcat9

          in the Command Prompt. (When using different version of Tomcat, change the number in the command to reflect the installed version.)

        • Configure the service by typing the command:

          .\Tomcat9.exe //US//Tomcat9 --JvmMs=512 --JvmMx=1024 --JvmOptions=-Dclover.config.file=C:\path\to\clover-config.properties#-XX:MaxMetaspaceSize=256m

          The parameter JvmMs is the initial and JvmMx is the maximum heap size in MB; JvmOptions are separated by '#' or ';'.

        • Start the service from Windows administration console or by typing the following command in the Command Prompt:

          .\Tomcat9.exe //TS//Tomcat9

    [Tip]Tip

    By default, when Apache Tomcat is run as a Windows service, it is not available for Java process monitoring tools (e.g., JConsole or JVisualVM). However, these tools can still connect to the process via JMX. In order to expose Tomcat's Java process via JMX, add the following options to the service settings:

    -Dcom.sun.management.jmxremote.port=3333
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=false

    Once the service is run with these options, you can connect to port 3333 using JMX and monitor the server.

    More information about running Java applications as Windows Service can be found at Apache Commons.

    Continue with:  Installation of CloverDX Server.

    Apache Tomcat on IBM AS/400 (iSeries)

    Additional settings are required to run CloverDX Server on the iSeries platform:

    1. Declare you are using Java 8.0 32-bit.

    2. Run Java with parameter -Djava.awt.headless=true.

    To configure the settings, modify (or create) the [Tomcat_home]/bin/setenv.sh file to contain:

    JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk70/32bit
    JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

    Continue with:  Installation of CloverDX Server

    Installation of CloverDX Server

    1. Check if you meet the prerequisites:

    2. It is strongly recommended to adjust the default limits for Memory allocation (see the Memory Settings section).

      You can set the initial and maximum memory heap size by adjusting the Xms and Xmx JVM parameters:

      Unix-like systems:

      • Create the [Tomcat_home]/bin/setenv.sh file.

      • Type or paste in the following lines:

        export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxMetaspaceSize=512m -Xms128m -Xmx1024m"
        export CATALINA_OPTS="$CATALINA_OPTS -Dderby.system.home=$CATALINA_HOME/temp -server"
        echo "Using CATALINA_OPTS: $CATALINA_OPTS"

      Windows systems:

      • Create the [Tomcat_home]\bin\setenv.bat file.

      • Type or paste in the following lines:

        set "CATALINA_OPTS=%CATALINA_OPTS% -XX:MaxMetaspaceSize=512m -Xms128m -Xmx1024m"
        set "CATALINA_OPTS=%CATALINA_OPTS% -Dderby.system.home=%CATALINA_HOME%/temp -server"
        echo "Using CATALINA_OPTS: %CATALINA_OPTS%"
      [Tip]Tip

      For performance reasons, it is recommended to run the container in the "server mode" by setting the -server switch, as seen in the settings above. [1]

      Note that on a 64-bit capable JDK, only the Java Hotspot Server VM is supported so the -server option is implicit.

    3. Go to the download section of your CloverDX account and download the clover.war (web archive) file containing CloverDX Server for Apache Tomcat.

    4. Copy clover.war to the [Tomcat_home]/webapps directory.

    5. Tomcat should automatically detect and deploy the clover.war file.

    6. Check whether CloverDX Server is running:

      • Run Tomcat.

      • Open a new tab in your browser and type http://localhost:8080/clover/ in the address bar.

      • Use the default administrator credentials to access the web GUI:

        username: clover

        password: clover

    Continue with: Configuration of CloverDX Server on Apache Tomcat

    Configuration of CloverDX Server on Apache Tomcat

    [Tip]Tip

    Default installation (without any configuration) is only recommended for evaluation purposes. For production use, at least a dedicated, system database and SMTP server configuration is recommended.

    For easy configuration of CloverDX Server, use Setup GUI, where you can configure various properties including the connection to the database, username and password, path to the license file, private properties, Clusters and much more (see Chapter 17, List of Configuration Properties and Chapter 51, Cluster Configuration). We recommend you place the file in a specified location and define the path to the file with a system property.

    The content of such a file (an example with a PostgreSQL database):

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://127.0.0.1/clover_db?charSet=UTF-8
    jdbc.username=yourUsername
    jdbc.password=yourPassword
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
    Properties File in Specified Location

    The properties file is loaded from a location specified by a system property or by an environment variable clover_config_file or clover.config.file.

    1. Create the cloverServer.properties file in a directory readable by Apache Tomcat. (If you need an example of connection to any of the supported database systems, see Chapter 16, System Database Configuration.)

    2. Edit the [Tomcat_home]/bin/setenv.sh file (if it does not exist, you can create it).

    3. Set the system property by adding the following line into the file:

      JAVA_OPTS="$JAVA_OPTS -Dclover_config_file=/path/to/cloverServer.properties"


    [1] For more information, see the Redistributable JDK(TM) Files section in the Oracle's JRE Readme.