# Installing on Red Hat Enterprise Linux

## Introduction <a href="#toc417629842" id="toc417629842"></a>

This document describes how to install and run Composable Agentic Platform on Red Hat Enterprise Linux. This example uses an AWS EC2 instance running Red Hat Enterprise Linux 10.1 (Coughlan).

## Requirements: <a href="#toc435709304" id="toc435709304"></a>

* Red Hat Enterprise Linux 10.1+ (Coughlan) – RHEL 7, 8, and 9 are also supported
* JDK 21 (RHEL 10+) or JDK 11 minimum (RHEL 7–9)
* `CAP-Console-11.0.0.zip` distribution for Composable Agentic Platform
* A suitable Linux terminal client and SSH connection to the server established
* Root user access permissions

## Useful things to know <a href="#toc86835987" id="toc86835987"></a>

Composable Agentic Platform requires Java v19+ JDK Runtime Environment to run so check if Java is installed and the Java running version. JDK 21 is recommended for RHEL 10.

The Composable Agentic Platform installation uses the open source Jetty application server.

## Check Java installation and version <a href="#toc86835988" id="toc86835988"></a>

```sh
java -version
```

Will either return "command not found" when no Java installation has been installed or display the current Java installation details.

e.g., Java version details

```sh
java -version
openjdk version "1.8.0_65"

OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
```

## Install or modify Java <a href="#toc86835989" id="toc86835989"></a>

If you have an older Java version, then you’ll need to upgrade with the following Java installation commands.

{% hint style="info" %}
**RHEL 10** uses `dnf` instead of `yum`. Use the RHEL 10 commands below if you are on RHEL 10.
{% endhint %}

**RHEL 10+ (JDK 21 recommended):**

```sh
sudo su root
dnf install java-21-openjdk-devel
```

After installation, set the default JDK:

```sh
alternatives --config java
```

Select the java-21 entry when prompted.

**RHEL 7, 8, 9 (JDK 11 minimum):**

```sh
sudo su root
yum install java-11-openjdk-devel
```

After the yum installation has completed, set the default JDK to be java-11 by using this command:

{% code overflow="wrap" %}

```sh
update-alternatives --config java

There is 1 program that provides 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.6.10-3.el7.x86_64/bin/java)

Enter to keep the current selection[+], or type selection number: 1

```

{% endcode %}

If there are multiple alternatives, enter the number in front of the java-11 entry, and the correct Java version is now configured.

## Download, upload, unzip, run. <a href="#toc86835990" id="toc86835990"></a>

1. Download the Composable Agentic Platform distribution zip file and upload to the RHEL instance.

There are many ways to upload a file over to a Linux environment. Here is an example using the secure copy command “scp”.\
A temporary directory could also be used or created to upload the file e.g`. /tmp` and then move the package to the correct location.

Example:

{% code overflow="wrap" %}

```sh
scp -i [YOUR KEY NAME] CAP-Console-11.0.0.zip root@[YOUR SERVER NAME]:~
CAP-Console-11.0.0.zip 12% 28MB 88.1KB/s 37:36 ETA
```

{% endcode %}

2. Unzip the package under the `/opt/local` directory.

Note: root permissions may be required to create the local folder so switch to root if needed.

Unzip may need to be installed first.

**RHEL 10+:**

```sh
dnf install unzip
```

**RHEL 7, 8, 9:**

```sh
yum install unzip
```

Then unzip to `/opt/local`:

```sh
unzip CAP-Console-11.0.0.zip -d /opt/local
```

The unzipped contents will extract to a `CAP-Console-11.0` directory. Rename it to "Tomorrow" using the `mv` command:

{% code overflow="wrap" %}

```sh
mv /opt/local/CAP-Console-11.0 /opt/local/Tomorrow
ls /opt/local/Tomorrow
BaseApp Certificates ConsoleCLI Demonstration Documentation HOME integration-examples jetty9 jre Multi-Protocol server Stress Tomorrow.bat Tomorrow.command Tomorrow.sh WinService
```

{% endcode %}

Note: the location of the file named Product Reference.pdf is in the Documentation folder. This is the comprehensive document for the entire Composable Agentic Platform.

Important: Don’t refer to Product Reference.pdf until the latest updates have been applied via console updates after installation, as there may be an update available.

3. Set execute permissions on the startup scripts. Switch to a root user if required.

**RHEL 10+ (systemd):** Only `tomorrow.sh` is needed — `tomorrowstart` is not used with systemd.

```shell
chmod 755 /opt/local/Tomorrow/server/bin/tomorrow.sh
```

**RHEL 7, 8, 9 (SysV init):** Both scripts need execute permission.

```shell
chmod 755 /opt/local/Tomorrow/server/bin/tomorrow.sh
chmod 755 /opt/local/Tomorrow/server/bin/tomorrowstart
```

4. Register CAP Console as a system service.

{% hint style="info" %}
**RHEL version matters here.** RHEL 10 uses **systemd only** — the `/etc/init.d/` directory no longer exists. RHEL 7, 8, and 9 support both approaches, but systemd is preferred.
{% endhint %}

**RHEL 10+ — systemd (required)**

Create a systemd unit file:

```sh
cat > /etc/systemd/system/cap-console.service << 'EOF'
[Unit]
Description=CAP Console (Composable Agentic Platform)
After=network.target

[Service]
Type=forking
Environment="JETTY_HOME=/opt/local/Tomorrow/jetty9"
Environment="JETTY_BASE=/opt/local/Tomorrow/server"
Environment="JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true -Dderby.system.home=../HOME/Data -Xms64m -Xmx2048m -Dorg.eclipse.jetty.server.Request.maxFormKeys=20000"
WorkingDirectory=/opt/local/Tomorrow/server
ExecStart=/opt/local/Tomorrow/server/bin/tomorrow.sh start
ExecStop=/opt/local/Tomorrow/server/bin/tomorrow.sh stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF
```

Reload systemd and enable the service to start at boot:

```sh
systemctl daemon-reload
systemctl enable cap-console
```

**RHEL 7, 8, 9 — SysV init (legacy)**

```sh
cp /opt/local/Tomorrow/server/bin/tomorrowstart /etc/init.d/
chmod 755 /etc/init.d/tomorrowstart
chkconfig --add tomorrowstart
```

Verify the service levels are set correctly:

```sh
chkconfig tomorrowstart --list
tomorrowstart 0:off 1:off 2:on 3:on 4:on 5:on 6:off
```

5. (**RHEL 7, 8, 9 only**) Verify the `tomorrowstart` service levels shown in step 4 are correct — `2:on 3:on 4:on 5:on` confirms it will start at boot.
6. Now start the Composable Agentic Platform service.

### Useful things to know before launching <a href="#toc86835991" id="toc86835991"></a>

When launching the console application, there may be other demo applications and a built-in proxy server that will also launch at the same time. Default ports 80 and 443 are used to run the console application, and therefore must be available before launching. To modify default ports, refer Product Reference.pdf section: **Port numbers and how to change them**.

<table data-header-hidden><thead><tr><th width="166"></th><th></th></tr></thead><tbody><tr><td>Port</td><td>Use</td></tr><tr><td>80</td><td>HTTP port for the console, demo applications and the built-in proxy</td></tr><tr><td>443</td><td>HTTPS port for the console, demo applications and the built-in proxy</td></tr></tbody></table>

**RHEL 10+ (systemd):**

```shell
systemctl start cap-console
```

**RHEL 7, 8, 9 (SysV init):**

```shell
service tomorrowstart start
```

The following output example should be seen:

{% code overflow="wrap" %}

```sh
Starting Jetty: 2020-04-17 05:40:35.142:INFO::main: Logging initialized @826ms to org.eclipse.jetty.util.log.StdErrLog
2020-04-17 05:40:35.768:INFO::main: Console stderr/stdout captured to /opt/local/Tomorrow/server/logs/stderrout-2020_04_17.log
. . . . OK Fri Apr 17 05:40:54 CDT 2020
```

{% endcode %}

Note: To stop Composable Agentic Platform use:

**RHEL 10+ (systemd):**

```shell
systemctl stop cap-console
```

**RHEL 7, 8, 9 (SysV init):**

```shell
service tomorrowstart stop
```

7. It is good practice to now reboot the RHEL server to verify Composable Agentic Platform restarts as a service at startup.

```shell
reboot
```

Composable Agentic Platform is now running as a service in RHEL.

Launch the Composable Agentic Platform console application via a compatible browser at this URL: `http://[YOUR SERVER NAME]/console`

Default administrator credentials:

```
Username: admin
Password: admin
```

<figure><img src="https://2423451286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42mDa58RoaDxb6t8mbaI%2Fuploads%2Fgit-blob-d3ade02bcd198cbdc6f80466b75bdf860d2f1bb1%2Fimage%20(68).png?alt=media" alt=""><figcaption><p>Login</p></figcaption></figure>
