<!-- Source: https://docs.squirro.com/en/latest/getting/install/rocky-linux-setup.html -->
# Rocky Linux Setup

This page describes how to install a Linux operating system and add the packages that the [Squirro Ansible deployment](ansible/index.md#ansible) requires. Rocky Linux 9 serves as the example throughout this page. Squirro supports other operating systems as well. For the full list, along with the hardware requirements, see the [System Requirements](system-requirements.md#install-system-requirements) page.

A minimal installation is quick. It installs around 370 packages and uses less than 2 GB of disk space. The Ansible deployment then adds the packages that Squirro requires. Your organization may require further packages as well, such as monitoring, backup, or endpoint security agents, so check which internal policies apply before you start.

The procedure covers a single server, which suits a proof of value, testing, development, or a small deployment. For a larger or more complex deployment, a Squirro solutions engineer assists with the architecture design and planning. To arrange that, visit the [Squirro Support website](https://go.squirro.com/support) and submit a technical support request for architecture support.

## Before You Begin

Confirm you have the following before you start:

- A physical or virtual machine that meets the specifications on the [System Requirements](system-requirements.md#install-system-requirements) page.
- A bootable Rocky Linux 9 ISO for the `x86_64` architecture, available from the [Rocky Linux download page](https://rockylinux.org/download).
- A host name for the server. Many organizations apply a naming policy, so confirm the name with your IT department before you start.
- A static IP address reserved for the server, together with the netmask, the gateway, and the DNS server addresses.
- Outbound internet access on TCP ports 80 and 443. The steps on this page reach the Rocky Linux repositories for the operating system updates, `mirror.squirro.net` for the Squirro packages, and `galaxy.ansible.com` for the Ansible collections. For the complete list of domains required during installation and upgrade, see the outbound internet access section of the [System Requirements](system-requirements.md#install-system-requirements) page.
- Credentials for the Squirro package repository. If you do not have them, visit the [Squirro Support website](https://go.squirro.com/support) and submit a technical support request for repository credentials.

## Install Rocky Linux 9

Boot the server from the ISO and select Install Rocky Linux 9. The settings below are the most important ones for a Squirro server. Accept the defaults everywhere else, because you can change most settings later on the running system. The disk layout is the exception, as a change after the installation requires a rebuild.

### Keyboard

1. Click Keyboard and add the layout that matches the keyboard attached to the server. The installer derives the layout from the installation language, which often does not match the hardware.
2. Select your layout and move it to the top of the list to make it the default.
3. Use the test field to confirm that the layout produces the characters you expect, in particular the symbols used in the root password. The console hides the password characters at login, so a layout mismatch is hard to diagnose afterward.

### Time and Date

Confirm the time zone. The installer selects one from the location of the server, which is not always the one you want. Squirro recommends UTC for a deployment that serves users in more than one region, because it keeps log timestamps comparable across nodes. Leave network time synchronization on, so that the clock stays accurate.

### Software Selection

1. Select Minimal Install as the base environment.
2. Under Additional software for Selected Environment, clear every check box, including Standard. The Ansible deployment installs the dependencies that Squirro needs, and [Install the Required Packages](#install-the-required-packages) covers the packages required to run the deployment itself.

### Security Profile

The installer applies no security profile by default. If your organization requires one, such as DISA STIG, CIS, or PCI-DSS, select it on this screen before you confirm the disk layout. Some profiles require separate partitions for directories such as `/var` and `/var/log`, which automatic partitioning does not create.

### Installation Destination

Select the target disk and click Done. Automatic partitioning is the default and is sufficient for a single-server installation.

> **Note**
>
> Squirro is I/O intensive. If your organization requires manual partitioning, place `/var` on dedicated storage to separate Elasticsearch and application data from the system partition.

### Network and Host Name

The installer connects the interface with DHCP automatically, so the server reaches the network without a change on this screen. Two settings still matter for a Squirro node:

1. Set the host name for the server. The installer leaves it unset, and the server then reports `localhost.localdomain`. The deployment derives the default Elasticsearch cluster name from the host name, and logs and monitoring output identify the server by it. Give every node a unique and recognizable name.
2. Click Configure to assign a static IP address. Squirro recommends a static address for every node, because an address that changes at a lease renewal or a reboot can cause service failures.

### Root Password

1. Set a strong root password. Squirro recommends generating the password with a password manager and storing the credentials in a secure shared vault.
2. To log in over SSH as `root`, select Allow root SSH login with password. The installer clears this check box by default, and the server then refuses every root login that uses a password.

After the installation completes, click Reboot System and remove the installation media.

> **Note**
>
> A minimal installation starts `sshd` and `firewalld` automatically, so neither needs attention on the running server.

## Install the Required Packages

Log in as `root` and run the commands below. A minimal installation does not include the tooling that the deployment needs.

If you log in with another account, prefix the `dnf` commands with `sudo`, because they fail otherwise with `Error: This command has to be run with superuser privileges`.

Apply the available updates:

```console
dnf update
```

If the update installs a new kernel, reboot the server before you continue.

Confirm that the server reaches the Squirro package repository:

```console
curl -I https://mirror.squirro.net
```

A response with status `200` confirms connectivity. If the request fails, check the network and DNS configuration of the server before you continue.

Install Ansible and the two archive tools:

```console
dnf install ansible-core unzip tar
```

A minimal installation includes neither `unzip` nor `tar`. The quickstart uses `unzip` to extract the Squirro Ansible archive, and an offline installation supplies the Squirro packages as a `.tar.gz` archive.

Install the two Ansible collections:

```console
ansible-galaxy collection install 'community.general:>=9.0.0,<10.0.0'
ansible-galaxy collection install 'ansible.posix:==1.6.1'
```

Run these two commands as the account that runs the playbook, because `ansible-galaxy` installs the collections into the home directory of the account that runs them.

> **Important**
>
> Keep the version constraints in the commands above. Without them, `ansible-galaxy` installs the newest release of each collection, and those releases are built for a newer `ansible-core` than Rocky Linux 9 provides. The constraints select the newest releases that still work with `ansible-core` 2.14.
>
>
>
> A mismatch is easy to miss, because the installation still reports success. The problem surfaces when the playbook runs, as a warning such as `Collection community.general does not support Ansible version 2.14.18`.

Confirm the result:

```console
ansible --version
ansible-galaxy collection list
```

The output shows `ansible [core 2.14.x]`, which is the version that Rocky Linux 9 provides, together with `community.general` 9.x and `ansible.posix` 1.6.1.

## Next Steps

The server is ready for the Squirro deployment. For step-by-step installation instructions, including the offline installation mode, see the [Ansible Quickstart Examples](ansible/quickstart-examples.md#ansible-quickstart-examples) page. Once the deployment finishes, secure the instance by working through the [Post-Installation Checklist](post-installation-checklist.md#install-post-installation-checklist) page.
