# RHEL / Fedora / CentOS

> Install Trident on Fedora, RHEL, CentOS, Rocky, AlmaLinux, and openSUSE using DNF, YUM, or Zypper.

Install Trident on Fedora, RHEL, CentOS Stream, Rocky Linux, AlmaLinux, openSUSE, Oracle Linux, and Amazon Linux using DNF, YUM, or Zypper.

<Admonition type="info" title="Tested Distributions">
This installation method is tested end-to-end on **Fedora 41**, **Rocky Linux 9**, **CentOS Stream 9**, **AlmaLinux 9**, and **openSUSE Leap 15.6** using automated integration tests that verify binaries, configuration, systemd service, caching behavior, and graceful shutdown.
</Admonition>

## Automatic Setup

The repository setup script handles everything:

```bash
curl -sSL https://pkg.trident-cache.com/setup | sudo sh
```

Then install:

**DNF (Fedora / RHEL 8+)**

```bash
sudo dnf install trident
```

**Microdnf (Rocky / Alma minimal)**

```bash
sudo microdnf install trident
```

**YUM (CentOS 7 / older)**

```bash
sudo yum install trident
```

**Zypper (openSUSE)**

```bash
sudo zypper install trident
```

## Manual Setup

### DNF / YUM Distributions

Fedora, RHEL, CentOS Stream, Rocky Linux, AlmaLinux, Oracle Linux, and Amazon Linux.

#### 1. Import the GPG signing key

```bash
sudo rpm --import https://pkg.trident-cache.com/gpg.key
```

#### 2. Add the repository

Create `/etc/yum.repos.d/trident.repo`:

```ini
[trident]
name=Trident Cache Proxy
baseurl=https://pkg.trident-cache.com/rpm/$basearch
enabled=1
gpgcheck=1
gpgkey=https://pkg.trident-cache.com/gpg.key
```

#### 3. Install

**DNF**

```bash
sudo dnf install trident
```

**Microdnf (minimal images)**

```bash
sudo microdnf install trident
```

**YUM**

```bash
sudo yum makecache
sudo yum install trident
```

### openSUSE / SLES

#### 1. Import the GPG signing key

```bash
sudo rpm --import https://pkg.trident-cache.com/gpg.key
```

#### 2. Add the repository

```bash
sudo zypper addrepo --gpgcheck --refresh \
  https://pkg.trident-cache.com/rpm/x86_64 trident
```

#### 3. Install

```bash
sudo zypper install trident
```

## What Gets Installed

The package installs and configures the following:

| Component | Path |
|-----------|------|
| Main binary | `/usr/bin/trident` |
| CLI tool | `/usr/bin/trident-cli` |
| Default config | `/etc/trident/config.toml` |
| Systemd service | `/usr/lib/systemd/system/trident.service` |
| Cache directory | `/var/lib/trident/` (owned by `trident:trident`) |
| Log directory | `/var/log/trident/` (owned by `trident:trident`) |

A `trident` system user and group are created automatically by the package's preinstall script.

## Verify Installation

```bash
trident --version
trident-cli --version
```

Check that the systemd service file is in place:

```bash
systemctl cat trident
```

## Next Steps

- [Configuration](https://docs.qoliber.com/docs/trident/configuration) -- edit `/etc/trident/config.toml`
- [Service Management](https://docs.qoliber.com/docs/trident/service) -- start and enable the systemd service
