# Install Contrast on-premises

### Important

These installation instructions are 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.

Contrast updates the library data approximately every 24 hours. Your Contrast installation pulls the data from a Contrast database hosted on the cloud.

## Steps

1. 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:

• RHEL 8:

[contrast@myserver ~]# dnf install -y ncurses-compat-libs libaio fontconfig
• CentOS or RHEL 7:

[contrast@myserver ~]# yum install -y libaio fontconfig
• Ubuntu or Debian:

[contrast@myserver ~]# apt-get install -y libaio1 libaio-dev fontconfig
• Windows: MySQL requires Microsoft Visual C++ 2015-2022 Redistributable Update..

2. Run the installer as a privileged user.

• On Windows, right-click on the installer and select Run As Administrator.

• On Linux, use the sudo command to start the installer.

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

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 pre-populate 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.