> For the complete documentation index, see [llms.txt](https://documentation.connexica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.connexica.com/getting-started/installation.md).

# 02. Installation

## Installation

### Installation Prerequisites

**Default ports required:** 6453/6454

*Please note that these can be configured to any ports required after installation.*

**Prerequisite software required:** Java Development Kit 17 or above

{% hint style="warning" %}
Please note that due to Oracle licencing changes, an Oracle licence must be purchased to continue to use Oracle JDK in a commercial environment. More information can be found on the Oracle website: [https:\*www.oracle.com/java/technologies/faqs-jsp.html](https://*www.oracle.com/java/technologies/faqs-jsp.html)
{% endhint %}

A recommended alternative to Oracle's JDK is to use the 'Open Java Development Kit' General-Availability Release 14 or above, which is available from <https://openjdk.java.net>. This is fully compatible with CXAIR.

**Operating system:** Windows Server 64-bit or Linux 64-bit

**Anti-virus software:** Exclude the live scanning of CXAIR folders for optimal performance.

### Server Specification

| Component     | Minimum Server Specification | Recommended Server Specification |
| ------------- | ---------------------------- | -------------------------------- |
| **Processor** | 8 Cores @ 3Ghz or above      | 12 Cores @ 3Ghz or above         |
| **Memory**    | 16GB or above                | 32GB or above                    |
| **Storage**\* | 1TB Disk in RAID 10 or SSD   | 2TB SSD                          |

*Storage required is dependent on the volume of data that will be indexed by CXAIR. The sizing above is an example, and a more accurate sizing can be provided during implementation scoping if required.*

### Workstation Specification

User workstations require a compatible web browser and a minimum resolution of 1280x1024 to access the solution. Compatible web browsers are:

* Microsoft Edge 90.0, or above
* Mozilla Firefox 51.0, or above
* Google Chrome 56.0, or above

Users must clear their browser cache prior to logging in.

## Windows Installation

Please ensure that the host is running Windows Server 64bit and that the user running the install package has administrator rights to complete the installation successfully.

### Installation Process

{% stepper %}
{% step %}

#### Initialising the Installer

Before executing the installer, all instances of the Mozilla Firefox internet browser must be closed. This includes using the Windows Task Manager to end any processes.

Right click on the **Command Prompt** option and select **Run as administrator**. This will ensure that the relevant permissions are enabled.

Change to the directory containing the installer using the **cd** command and enter the following:

```
“<install path for Java 64bit>\Java\<jdk version>\bin\java.exe” –jar CXAIR-<version number>.jar
```

For example:

```
“C:\Program Files\Java\jdk13.0.1\bin\java.exe” –jar CXAIR-2021.1.0.123.jar
```

The installer will then be launched.
{% endstep %}

{% step %}

#### Installer

After accepting the terms and conditions, the installation paths can be configured.

By default, \[CXAIR]\(doc:Technical Documentation.CXAIR.WebHome) will be installed to: **C:\Program Files\CXAIR**. To change the installation path, click **Browse** and select an alternative location. Click **Next** to continue.

The database path will then need to be specified. By default, the files will be installed to: **C:\Program Files\CXAIR\_Database**. To change the installation path, click **Browse** and select an alternative location.

After clicking **Next**, the installation process begins and the progress screen is displayed.

Once completed, click **Next** and specify whether to create shortcut entries in the start menu and on the desktop. After clicking **Next** again, the installation will be complete. Click **Done** to close the installer.
{% endstep %}

{% step %}

#### Starting the CXAIR Service

On a Windows installation, the service is configured to start automatically.

To restart the service, use the Windows Task Manager to start the service titled **CXAIR**.

When this service has the **Running** status, the process is complete.
{% endstep %}
{% endstepper %}

## Linux Installation

Please ensure the administrator password is available for the installer to run with the correct user privileges.

### Installation Process

{% stepper %}
{% step %}

#### Initialising the Installer

In a terminal window, enter the following:

```
sudo java –jar CXAIR-<version number>.jar
```

For example:

```
sudo java –jar CXAIR-2021.1.0.123.jar
```

This will open the installer in a new window.
{% endstep %}

{% step %}

#### Installer

After accepting the terms and conditions, the installation paths can be configured. To change the installation path, click **Browse** and select an alternative location. Click **Next** to continue.

The database path will then need to be specified. To change the installation path, click **Browse** and select an alternative location.

After clicking **Next**, the installation process begins and the progress screen is displayed. When complete, click **Done** to close the installer.
{% endstep %}

{% step %}

#### Starting the Service

Open the Terminal and change the directory to where the CXAIR directories were installed.

Following a successful installation, the following service will need to be started. This is only required the first time the solution is accessed.

```
CXAIR/controller/bin/installDaemon.sh
```

Then, the following service can be started:

```
CXAIR/controller/bin/startDaemon.sh
```

To automate this process on restart on Linux servers that use systemd, simply move the **cxair.service** file located in **/CXAIR/controller** to **/etc/systemd/system**.

The CXAIR service can then be started and stopped using the following two commands:

```
systemctl start cxair
systemctl stop cxair
```

To start the service at boot, use the following command:

```
systemctl enable cxair
```

To stop the CXAIR service starting automatically, use the following command:

```
systemctl disable cxair
```

{% endstep %}
{% endstepper %}

### Headless Servers

If the server is headless, there are a number of configurations that must be made prior to installation.

#### Xvfb

To allow reports to be exported, Xvfb needs to be installed. If not added automatically, the Xvfb.sh file will need to be added to the **CXAIR/wrapper/bin/** directory.

#### Slimerjs

When the installation process is complete, the **cxair.properties** file will need to be edited. Navigate to: **CXAIR\wrapper\com\connexica\cxair\tomcat** to locate the file and open it with a text editor. Locate the following line:

```
system.properties.connexica.cxair.slimerjs=<Location>
```

The location will need to be changed from **slimerjs** to **cxslimerjs**. The line should end in:

```
CXAIR\slimerjs\linux\x86\cxslimerjs
```

32bit installations

```
CXAIR\slimerjs\linux\x86_64\cxslimerjs
```

64bit installations

#### Inkscape

If installing a \[CXAIR]\(doc:Technical Documentation.CXAIR.WebHome) version prior to 2017.2, Inkscape will need to be installed in order for charts to render in their native resolution. Please refer to the Inkscape website for more information regarding the required installation for the Linux version in use.

When the Inkscape installation process is complete, the **cxair.properties** file will need to be edited. Navigate to: **CXAIR\wrapper\com\connexica\cxair\tomcat** to locate the file and open it with a text editor. Add the following line:

```
system.properties.connexica.cxair.inkscape=<inkscape.exe install path>
```

## Post-Installation Configuration

When accessing \[CXAIR]\(doc:Technical Documentation.CXAIR.WebHome) for the first time following a successful installation, a licence must be applied by the system admin account. Please refer to the [Licencing](doc:.Licencing.WebHome) chapter for more information.

Please note that \[deletion privileges]\(doc:Technical Documentation.CXAIR.Administration Guide.Security.2b. User Management.WebHome||anchor="Delete") must also be activated by the system admin account for any administrator users. Please refer to the \[User Management]\(doc:Technical Documentation.CXAIR.Administration Guide.Security.2b. User Management.WebHome) chapter for more information.

If using an Apache server, the following line needs to be added to the **tomcat.properties** file located at **CXAIR/wrapper/com/connexica/cxair/tomcat**:

```
catalina.port.ajp13=8009
```

## Custom Installation

To create a custom installer, the system must have Apache Ant installed. Please contact support to receive the necessary **CXAIR** archive file.

### Parameters

Locate and unpack the custom installer archive and open the **build.properties** file with a text editor. By default, the following lines are displayed:

```
product.name=CXAIR
context=cxair
skipLicence=false
```

To change the name of the product, change the **product.name** value. Setting this option will change the references in the installer and the names of newly created system services.

The **context** value reflects the URL reference that is used to access the solution. The URL is constructed in the following format:

```
http:~/~/<server name>:<port number>/<context>
```

The **skipLicence** line allows the licence agreement to be removed from the installer if the parameter is set to **true**.

### Images

To customise the images used, navigate to the **images** folder of the archive. Replace the **cxair.ico** file to change the shortcut icon, and the **installer.png** file to change the image displayed during the installation.

Ensure that the replacement files have the same name and file type as the original files.

### Building the Installer

To build the installer, open a Command Prompt or Terminal window and change the directory to the location where the custom install archive file was unpacked. Then, enter the directory for Apache Ant and press the return key.

This will start the build process. Once completed, **BUILD SUCCESSFUL** is displayed along with the build time, indicating that the installer has been built.

### Running the Installer

To run the installer, follow the previously detailed installation steps.
