# Install Contrast

### Important

This installation is for on-premises use only.

If you are using the hosted version of Contrast, you can instrument your applications without installing Contrast. Get started by installing an agent.

The Contrast installer includes a Tomcat servlet container, a MySQL database instance and an AdoptOpenJDK Hotspot Java Virtual Machine. All of these components are embedded within the installation binary and deployed to a single server as part of the Contrast architecture.

Before you begin:

To run the installation:

1. To run Contrast, you must preconfigure your base operating system with a shared library for running MySQL. Additionally, the system package fontconfig is required on Linux to install fonts. Run the command for your operating system:

2. Complete the run process as a privileged user. On Windows, right-click on the installer and select Run As Administrator. On Linux, use the sudo command to launch the installer.

3. Respond to installer questions according to your situation. (For example, you can create a MySQL backup, configure the JRE or prepare for distributed deployment.)

You can further configure Contrast after startup. You can customize installer behavior using these command line arguments when you run the installation script:

Command line argument

Description

-h -help

Shows help for common command line arguments.

-c

Forces the installation to run in Console Mode.

-q

Executes the installer in Unattended Mode.

-g

Forces the installation to run in GUI Mode. (Windows Only)

-console

If the installer is executed in Unattended Mode and the -console argument is passed on Windows, a second console shows the output of the installer.

-overwrite

Forces the installer to overwrite all files in Unattended Mode regardless of the overwrite policy specified in the installer. Caution: This can cause your configuration to be overwritten back to default values.

-dir

Only valid in Unattended Mode; specifies the directory where Contrast should be installed.

-Dinstall4j.debug

By default, the installer catches all exceptions, creates a crash log and informs the user about the location of that log file. This might be inconvenient when debugging an installer; so, this system property switches off the default mechanism, and exceptions are printed to stderr.

-Dinstall4j.keepLog=true -Dinstall4j.alternativeLogfile=[path]

The installer creates a log file prefixed i4j_log for all installations and uninstallation in your temp directory. This log file can be helpful for debugging purposes. If your installer contains an Install files action and terminates successfully, the log file is copied to [installation dir]/.install4j/installation.log. Otherwise, the file is deleted after the installer or uninstaller terminates by default.

When using the -Dinstall4j.keepLog=true option, the log file won't be deleted. With the -Dinstall4j.alternativeLogfile=[path] option, the log file is copied to the file specified with [path]. This should be an absolute path name. Neither option has any effect if the log file has already been copied to the installation directory.

-varfile (filename)

Specifies a variable-file to be used. When installing in Unattended Mode, this allows you to provide customizations to the default values set by the installer.

--skip-preflight

Skips preflight checks (current user is root, dependencies present). If using this parameter, it must be the first parameter passed on the command line.

### Note

If you're using a distributed setup for the Contrast application, you should use a distributed MySQL instance during setup.

### Important

Client agents use the Contrast URL to communicate back to the application. Contrast makes the best attempt to determine the hostname and prepopulate this value; but, if the provided hostname isn't resolvable by clients on the network, they won't be able to communicate back to the server.

Please set this value to a Contrast host or load balancer that's reachable by your agent hosts.

4. Installation completes and the Contrast application performs its initial configuration. To confirm it has finished, you can visit the URL you specified above.