# Installation with RPMs

## Prerequisites

1. Install CentOS/RHEL 8 minimal:
   * we recommend having Red Hat's support available if you're going to use RHEL
   * you can use version CentOS/RHEL 7 as well
2. Make sure your OS is up to date (as the `root` user):

   ```
   # dnf -y update
   ```

   If the kernel is updated, then you need to reboot your operating system.
3. Install Storware-endpoints repository:

   * create a file `/etc/yum.repos.d/kodo-endpoints.repo`
   * edit the file and insert the information presented below

   ```
   [kodo-endpoints]
   name=Kodo for Endpoints
   baseurl=https://repo.storware.eu/storware/current/el8/
   enabled=1
   gpgcheck=0
   ```
4. Install MariaDB repository:

   * generate `.repo` file at [MariaDB download](https://downloads.mariadb.org/mariadb/repositories) site
   * copy and paste generated repo file into `/etc/yum.repos.d/MariaDB.repo`, so it looks similar to this (this one for CentOS/RHEL 8):

   ```
   # MariaDB 10.4 CentOS repository list - created 2021-08-08 11:18 UTC
   # http://downloads.mariadb.org/mariadb/repositories/
   [mariadb]
   name = MariaDB
   baseurl = http://yum.mariadb.org/10.4/centos8-amd64
   module_hotfixes=1
   gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
   gpgcheck=1
   ```

{% hint style="info" %}
It is recommended to install Storware Endpoints on different machine than Storware Backup & Recovery.
{% endhint %}

## Storware Endpoints server installation

Storware Endpoints server consists of a server (central management point with WebUI and MariaDB database). To install the server components, do the following steps:

1. Log in as the `root` user.
2. Use the command below to install `sbr-endpoints-server` the package.

```
# yum install sbr-endpoints-server
```

The installation process starts. Select "**y**" when asking about the GPG key:

```
Retrieving key from 
https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
 Importing GPG key 0x1BB943DB: Userid : "MariaDB Package Signing Key 
package-signing-key@mariadb.org
" Fingerprint: 1993 69e5 404b d5fc 7d2f e43b cbcb 082a 1bb9 43db From : 
https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
 Is this ok [y/N]
```

The installation process should take a few minutes.

The installation should be finished with the "**Complete**!" message.

## Storware Endpoints server initialization

Once the Storware Endpoints server is installed, you have to perform the server initialization. Before you start, make sure the MariaDB database service is running. Execute the following command:

```
# systemctl status mariadb
● mariadb.service - MariaDB 10.4.20 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Thu 2021-08-05 09:27:56 CEST; 1 day 7h ago
```

If the service is not running, start it by executing the following command:

```
# systemctl start mariadb
```

As the `root` user run the following script:

```
# /opt/storware/kodo-server/api-core/bin/sbr-init.sh --dbpassword xyz
```

Follow the instructions to complete the configuration.

{% hint style="info" %}
You can use the following parameters with the script:

**--dbpassword password -** password for Storware Endpoints database (default: random value)

\--dbport port - database port number (default: 3306)

\--dbusername username - database username (default: kodo)
{% endhint %}

#### Example:

```
[root@localhost ~]# /opt/storware/kodo-server/api-core/bin/sbr-init.sh --dbrootpassword xxxxx
Storware KODO for Endpoints server initial configuration script (v1.0)
MariaDB host:  localhost
MariaDB port:  3306
MariaDB KODO database user:  kodo
MariaDB KODO user password:  HbhJhrhCfyrpak5nOWgWicEPRs3DgU52
MariaDB root password:  1qazxsw23edc
Creating symlinks
Connecting to database localhost:3306
Checking if database user exists
Checking if database exists
Creating db user
Creating database
Granting privilages
Configuring database
Restarting database
Updateing KODO for Endpoints configuration
Preparing dsmcert database
Start KODO server with: systemctl start sbr-endpoints-server
[root@localhost ~]#
```

Storware Endpoints server initialization script creates the **Storware-Endpoints** service (sbr-endpoints-server), which is the main server process. To start the **Storware-Endpoints** service, execute the following command:

```
# systemctl start sbr-endpoints-server
```

## Configuring firewall

1. You have to open the 8181 port (for HTTPS, HTTP requires port 8080) on the firewall. Here is an example:

   ```
   # firewall-cmd --add-port=8181/tcp --permanent
   # firewall-cmd --complete-reload
   To check open ports:
   # firewall-cmd --list-all
   ```
2. If the Storware Endpoints server is up and running, and firewall ports are open, you should be able to log in to Storware Backup & Recovery using your browser, and in the Endpoints tab add a new installed Storware Endpoints server using `https://IP_OF_YOUR_MACHINE:8181` that you just created.

{% hint style="info" %}

```
**Note:** Storware Endpoints server credentials are presented in chapter [Administration levels](../administration-levels.md)
```

{% endhint %}

1. Storware Endpoints server credentials are presented in chapter [Administration levels](/70/deployment/endpoints-how-to-install/administration-levels.md)

Go to the [IBM Spectrum Protect server configuration](/70/deployment/endpoints-how-to-install/installation-overview/ibm-spectrum-protect-server-configuration.md) section to learn how to prepare and configure the IBM Spectrum Protect server for use with the Storware Endpoints server.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.storware.eu/70/deployment/endpoints-how-to-install/installation-overview/installation-with-rpms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
