# SUSE / openSUSE

This guide covers installing the LinuxGuard agent on SUSE Linux Enterprise Server (SLES), openSUSE Leap (regular releases), and openSUSE Tumbleweed (rolling release).

## Prerequisites

Before installing, ensure your system meets these requirements:

* **Kernel**: Linux kernel 4.18 or later
* **Permissions**: Root or sudo access
* **Network**: Outbound HTTPS access to `packages.linuxguard.io`

> **Note**: For complete system requirements including architecture and detailed prerequisites, see the [Prerequisites Guide](/how-to-guides/how-to/prerequisites.md).

## Repository Setup

The recommended installation method uses the Zypper package manager to install LinuxGuard from the official repository.

### Step 1: Import GPG Key

Import the LinuxGuard package signing key:

```bash
sudo rpm --import https://packages.linuxguard.io/gpg/linuxguard.asc
```

### Step 2: Add Repository

Add the LinuxGuard repository to your system:

```bash
sudo zypper addrepo --gpgcheck --refresh \
  https://packages.linuxguard.io/zypper/sles/15 linuxguard
```

> **Note**: Zypper may prompt you to accept the GPG key on first installation. This is normal — review and accept the LinuxGuard signing key to proceed.

### Step 3: Install Agent

Update the repository cache and install the agent:

```bash
sudo zypper refresh
sudo zypper install linuxguard-agent
```

The installer will also install the `sysstat` dependency, which provides `iostat` and `mpstat` for system metrics collection.

## Direct Download

If you prefer to download and install the package manually, you can download the RPM package directly:

```bash
curl -fsSL -o linuxguard-agent.rpm \
  https://packages.linuxguard.io/zypper/pool/linuxguard-agent-latest.$(uname -m).rpm
sudo rpm -ivh linuxguard-agent.rpm
```

> **Note**: Manual installation does not configure automatic updates. We recommend using the repository method for production systems.

## Verification

After installation, verify the agent was installed correctly:

### Check Agent Binary

Confirm the agent binary is installed:

```bash
which linuxguard-agent
```

Expected output:

```
/usr/bin/linuxguard-agent
```

### Verify Agent User

Confirm the dedicated `linuxguard` user was created:

```bash
id linuxguard
```

Expected output (UID/GID may vary):

```
uid=999(linuxguard) gid=999(linuxguard) groups=999(linuxguard)
```

### Check Service Status

Verify the agent service is installed (it will not be running until enrollment):

```bash
sudo systemctl status linuxguard-agent
```

Expected output:

```
○ linuxguard-agent.service - LinuxGuard Agent
     Loaded: loaded (/usr/lib/systemd/system/linuxguard-agent.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
```

The agent is now installed and ready for enrollment.

## Troubleshooting

### GPG Key Trust Prompt

**Issue**: Zypper prompts to accept GPG key during installation.

**Solution**: This is normal behavior on first install. Review the key fingerprint and accept to proceed with installation.

### Repository Priority Conflicts

**Issue**: Conflicting repository priorities cause package resolution errors.

**Solution**: Check repository priorities with:

```bash
zypper lr -P
```

Adjust priority if needed using `zypper modifyrepo --priority <number> linuxguard`.

### Tumbleweed Kernel Compatibility

**Issue**: Rolling release may have very recent kernel versions.

**Solution**: Verify the agent supports your kernel version. Contact support if you encounter compatibility issues with cutting-edge Tumbleweed kernels.

> **Note**: For additional troubleshooting guidance, see the [Troubleshooting Guide](/troubleshooting.md).

***

**Next Step**: [Configuration →](/how-to-guides/how-to/configuration.md)

**Related**: [Installation Overview](/how-to-guides/how-to/installation.md) | [Prerequisites](/how-to-guides/how-to/prerequisites.md) | [Uninstallation](/how-to-guides/how-to/uninstallation.md)


---

# 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.linuxguard.io/how-to-guides/how-to/installation/suse.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.
