# IT-Conductor Gateway Setup on Linux

The IT-Conductor Gateway enables communication between the customer's site network and the IT-Conductor cloud platform. It must be connected successfully before any private customer systems can be monitored by IT-Conductor.

### Installation Instructions

1. Log in to the provisioned Gateway VM.
2. Configure TIME\_WAIT socket recycling. Edit "/etc/sysctl.conf" and add the following entries before saving:

```
net.ipv4.tcp_fin_timeout = 20
net.ipv4.tcp_tw_reuse = 1
net.core.somaxconn = 65535
```

3. Reload the settings using the command below:

```
# sudo sysctl -p
```

4. In IT-Conductor, navigate to **Support → Downloads →** [**Gateway Downloads**](https://service.itconductor.com/objectSavedSearch?OBJECT_Id=55792548)**.**

<figure><img src="https://377464071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXhp08OmU8050PePmMgDt%2Fuploads%2FVSQq6gKeZOJ9jj0qGN4q%2Fgateway-downloads.png?alt=media&#x26;token=c9e6c03c-47f4-4f0c-b629-1ada32ab031e" alt=""><figcaption><p>Figure 1: Gateway Installation Media Downloads</p></figcaption></figure>

5. Download "itconductor-gateway-x-xx.xxx" to a local directory.

{% tabs %}
{% tab title="Linux" %}
• Install the RPM package. You should see the following output:

```
# sudo rpm -U itconductor-gateway-x-xx.x86_64.rpm
Registering Service ...
Configuring Service Startup ...
IT-Conductor Gateway installed successfully
```

{% endtab %}

{% tab title="Ubuntu" %}

* Install the DEB package. You can use dpkg or apt command:

```
$ sudo dpkg -i itconductor-gateway-6-81.deb
Registering Service ...
Configuring Service Startup ...
IT-Conductor Gateway installed successfully
```

or

```
$ sudo apt -i itconductor-gateway-6-71.deb
Registering Service ...
Configuring Service Startup ...
IT-Conductor Gateway installed successfully
```

{% endtab %}
{% endtabs %}

6. Configure Gateway parameters:

```
# /opt/itconductor/gwconfig
IT-Conductor Gateway Configuration build: xxxxxxxxxxxx
Gateway ID [GATEWAYID]: xxxxxx
Account ID [ACCOUNTID]: xxxxxx
API Key [APIKEY]: xxxxxx
Proxy [false]:
Configuration saved
```

* **Account ID** - This is the Service Account ID.
* **API Key** - The API Key for the Service Account will be generated when the Service Account is created.

To obtain the Service Account ID and API Key in IT-Conductor, navigate to **Management → Security → Service Accounts**.

<figure><img src="https://377464071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXhp08OmU8050PePmMgDt%2Fuploads%2FkZ7dmR2r76xYjOfxkkjD%2Fservice-accounts.png?alt=media&#x26;token=8e6e0d0f-636b-4716-a4b3-734a2e5f5f36" alt=""><figcaption><p>Figure 2: IT-Conductor Service Accounts</p></figcaption></figure>

Then, select the account to display the configuration details, as shown in Figure 3.

<figure><img src="https://377464071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXhp08OmU8050PePmMgDt%2Fuploads%2Fc3vhPLPhPtkk0uBQNW8A%2Fservice-accounts-properties.png?alt=media&#x26;token=5204667a-265f-467b-86ad-f0637e5622fb" alt=""><figcaption><p>Figure 3: IT-Conductor Service Account Properties</p></figcaption></figure>

* **Gateway ID** - This is the ID for one of the Gateways created by your administrator earlier.

To obtain the Gateway ID in IT-Conductor, navigate to **Management → Resources → Gateways**.

![Figure 4: IT-Conductor Remote Gateways](https://377464071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXhp08OmU8050PePmMgDt%2Fuploads%2Fdo3nkmF8QyJ0DdPrJqWW%2FGateway%20ID.png?alt=media\&token=42a49977-35ce-4190-b4b5-779d5ff468b6)

If the proxy is used for connecting to the internet, while running gwconfig utility choose Proxy=true:

<pre><code><strong># /opt/itconductor/gwconfig
</strong>IT-Conductor Gateway Configuration build: xxxxxxxxxxxx
Gateway ID [GATEWAYID]: xxxxxx
Account ID [ACCOUNTID]: xxxxxx
API Key [APIKEY]: xxxxxx
Proxy [false]: true
Proxy Host []: xxxxx
Proxy Port []: 8080
Configuration saved
</code></pre>

7. Configure JRE. To verify that the default Java installation is Java 8 x64 JRE, run the command below:

{% tabs %}
{% tab title="Linux" %}

```
# java -version
```

{% endtab %}

{% tab title="Ubuntu" %}

```
$ java -version
$ sudo apt install openjdk-8-jre-headless
```

![Figure 6: Ubuntu Java Version](https://377464071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXhp08OmU8050PePmMgDt%2Fuploads%2FvAtOKJMTrJwZ4X0C3992%2Fimage.png?alt=media\&token=0d5a44a5-0303-4f75-872f-a8e27d635607)

After installation, run the following commands:

```
$java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
```

{% endtab %}
{% endtabs %}

You can [download](https://service.itconductor.com/lib/jre_x64_linux_hotspot_8u345b01.tar.gz) a *tar* version of OpenJDK JRE from the IT-Conductor site or from the [Adoptium](https://adoptium.net/temurin/releases/?version=8) website.

* Extract the file to the "/opt/itconductor/" directory.
* Edit the "/opt/itconductor/conf/startup" file and replace the value to "java\_path=./\<JRE Directory>/bin/java".

8. Optionally configure Gateway custom **Gateway Maximum Heap Size -** the default size is calculated as: \<system available memory> - 500MB.

* Edit the "/opt/itconductor/conf/startup" file, and replace the **xmx** value with "xmx=4000m". This limits the heap size to 4000 MB.

9. Test the IT-Conductor cloud connectivity using the command below:

```
# /opt/itconductor/gwupdate
IT-Conductor Gateway build: xxxxxxxxxx
Starting update...
Gateway.jar is up to date
```

Normally, the update either downloads the latest version of Gateway.jar or reports that it is up to date. If no connection can be established to the cloud service, an error message will be displayed.

10. To start the gateway, use:

```
# sudo systemctl start itconductor-gateway
```

11. To stop the gateway, use:

```
# sudo systemctl stop itconductor-gateway
```

### Video

{% embed url="<https://www.youtube.com/watch?v=wTHlSldJE68>" %}
