# Deploy with the Offline RPM Bundle

This guide walks you through deploying API7 Enterprise on Red Hat-family operating systems (RHEL, Rocky Linux, AlmaLinux, and CentOS 8 and 9) from the offline RPM bundle. After you stage the API7 bundle and the required operating-system and database packages, the installation can proceed without internet access.

The primary procedure describes the RPM package layout used by API7 Enterprise 3.10.7 and later, where the Dashboard binary embeds the web UI. See the legacy package note below if you operate an earlier 3.10.x bundle.

## Architecture[​](#architecture "Direct link to Architecture")

API7 Enterprise has two layers: the control plane (CP) and the data plane (DP):

| Layer         | Role                 | Notes                                                                                                        |
| ------------- | -------------------- | ------------------------------------------------------------------------------------------------------------ |
| Control plane | Management & control | Configures gateways, signs data-plane certs, pushes config, aggregates observability; persists to PostgreSQL |
| Data plane    | Traffic processing   | Runs APISIX/OpenResty, executes routes and plugins; stateless, config synced from the control plane          |

For evaluation, the control plane and data plane can run on the same host. For production, run them on separate hosts. This guide uses "CP host" for the control-plane host and "DP host" for the data-plane host; in a single-host deployment, both terms refer to the same machine.

## Required Dashboard Components[​](#required-components "Direct link to Required Dashboard Components")

The Dashboard management UI and API require these components for a fully functional control plane. The first two are systemd services from the RPM bundle; the rest are prerequisites you provide.

| Component           | Provided by                                                                                                                                                          | Required    | Purpose                                                                                                                                           |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api7ee-dashboard`  | `api7ee-dashboard` RPM                                                                                                                                               | Yes         | Control-plane backend with the embedded web UI; serves the UI/API on `7443`                                                                       |
| `api7ee-dp-manager` | `api7ee-dp-manager` RPM                                                                                                                                              | Yes         | Pushes config to gateways, issues data-plane mTLS certs, handles heartbeat (`7943`)                                                               |
| PostgreSQL          | external; [Single-Host RPM Evaluation Quickstart](https://docs.api7.ai/api7-gateway/install/rpm-quickstart.md) installs a local one; provide your own for production | Yes         | Persistence: configuration, users, audit logs, etc.                                                                                               |
| Prometheus          | external (not in the bundle)                                                                                                                                         | For metrics | Stores gateway metrics via dp-manager remote-write; powers dashboard analytics (see [Install Prometheus](#metrics-prometheus))                    |
| Jaeger              | external (not in the bundle)                                                                                                                                         | For tracing | Stores request traces for the dashboard's online-debug / tracing views (dp-manager → OTLP collector `4318`; dashboard → query UI `16686`)         |
| `api7-gateway`      | `api7-gateway` RPM                                                                                                                                                   | Data plane  | Serves API traffic; not required to *run* the dashboard, but needed for it to manage anything (see [Onboard the data-plane gateway](#onboard-dp)) |

## System Requirements[​](#system-requirements "Direct link to System Requirements")

| Item                  | Requirement                                                                                                                                                                                          |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OS                    | RHEL / Rocky / AlmaLinux / CentOS 8 or 9, x86\_64 or aarch64                                                                                                                                         |
| Init system           | systemd (all components run as systemd services). Container-based evaluation must run systemd as PID 1 (see [Method A](#method-a))                                                                   |
| Privileges            | `root` (or `sudo`)                                                                                                                                                                                   |
| PostgreSQL            | 13+ (15 recommended); the control plane's only external dependency, local, on a separate host, or cloud-managed                                                                                      |
| Ports (control plane) | `7443` (Dashboard/API, external), `7943` (data-plane mTLS onboarding, open to DP hosts), `7900`/`7901`/`7081` (local/internal). Plain HTTP `7080` is disabled in the default Dashboard configuration |
| Ports (data plane)    | `9080`/`9443` (business traffic ingress)                                                                                                                                                             |
| Network               | Installation can run offline after the required packages are staged. For split deployment, the DP host must reach the CP host's `7943`, and the control plane must reach PostgreSQL's `5432`.        |

## Obtain the Bundle[​](#obtain-bundle "Direct link to Obtain the Bundle")

Pick the bundle that matches the target host. Identify its CPU architecture and RHEL-family major version first:

```
uname -m              # CPU architecture → <arch> (e.g. x86_64)

cat /etc/os-release   # see PLATFORM_ID (e.g. "platform:el9") → <dist> (e.g. el9)
```

The bundle filename uses the format `api7-ee-rpm-<version>-<dist>.<arch>.tar.gz`, such as `api7-ee-rpm-3.10.9-el9.x86_64.tar.gz`. Substitute the version supplied with your licensed bundle.

| Field       | Source                                                             | Example             |
| ----------- | ------------------------------------------------------------------ | ------------------- |
| `<version>` | The API7 Enterprise release you are installing                     | `3.10.9`            |
| `<dist>`    | RHEL-family major version, from `PLATFORM_ID` in `/etc/os-release` | `el8`, `el9`        |
| `<arch>`    | CPU architecture from `uname -m`                                   | `x86_64`, `aarch64` |

Copy the `.tar.gz` supplied with your license onto the target host. For an air-gapped host, also stage the operating-system and database packages the deployment needs before disconnecting it.

## Bundle Contents[​](#bundle-contents "Direct link to Bundle Contents")

After extraction, the directory contains:

| File                                 | Category          | Contents                                                                                             |
| ------------------------------------ | ----------------- | ---------------------------------------------------------------------------------------------------- |
| `api7ee-dp-manager-*.rpm`            | Control plane     | Data-plane management / config push / cert-signing service                                           |
| `api7ee-dashboard-*.rpm`             | Control plane     | Control-plane backend with the embedded web UI (TLS `7443`); provides the `api7ee-dashboard` service |
| `api7-gateway-*.rpm`                 | Data plane        | Gateway (APISIX, bundled OpenResty runtime)                                                          |
| `which-*.rpm`, `libxslt-*.rpm`, etc. | OS dependencies   | The few system libraries the gateway needs, bundled in                                               |
| `install.sh`                         | Installer         | One-shot offline install of all the RPMs above                                                       |
| `quickstart.sh`                      | Evaluation helper | Single-host evaluation one-shot (see [Method A](#method-a))                                          |

The gateway package ships its OpenResty runtime, while the control-plane packages ship static Go binaries. The host's `nodejs` and `openresty` packages are not required, so installation is fully offline and does not affect software already on the host.

Legacy split-console bundles

API7 Enterprise 3.10.2 through 3.10.6 use an older Dashboard package that also installs Node.js, a console tree, `console.env`, and a separate `api7ee-console` systemd service on internal port `3000`. Follow the instructions shipped with that bundle for its service and file layout. The procedures below describe the embedded-console package used in 3.10.7 and later.

API7 Enterprise 3.10.1 ships `x86_64` bundles for `el8` and `el9`. Follow the instructions and systemd units in that bundle.

The bundle does not include these external dependencies and deployment artifacts:

* PostgreSQL: the control plane's only external dependency (see [System Requirements](#system-requirements) / [Prepare PostgreSQL](#prepare-postgresql)).
* License: upload it in the Dashboard after installation.
* Data-plane certificate: issued automatically per gateway group by the Dashboard (see [Onboard the data-plane gateway](#onboard-dp)).

## Deployment Overview[​](#deployment-overview "Direct link to Deployment Overview")

For the standard deployment path, complete these tasks in order:

1. Prepare PostgreSQL.
2. Install the RPM packages.
3. Configure and start the control plane.
4. Bootstrap the dashboard: change the password and upload the License.
5. Onboard the data-plane gateway: use the Dashboard-issued certificate and connection parameters to configure the gateway on the DP host.
6. Verify that the instance is Healthy in the Dashboard.

Choose one path for your deployment:

| Path                                                                                                           | Use case                     | Characteristics                                                                          |
| -------------------------------------------------------------------------------------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------- |
| [Method A: Single-Host RPM Evaluation Quickstart](https://docs.api7.ai/api7-gateway/install/rpm-quickstart.md) | Single-host evaluation / PoC | One command; installs and initializes a local PostgreSQL automatically; ready in minutes |
| [Method B: Standard Deployment](#method-b)                                                                     | Production                   | Manual step-by-step; supports external/HA DB, split CP/DP, security hardening            |

## Method A: Evaluation Quickstart[​](#method-a "Direct link to Method A: Evaluation Quickstart")

For a single-host evaluation or PoC, the bundled `quickstart.sh` brings the control plane up in minutes. It installs the RPMs, installs and initializes a local PostgreSQL, configures and starts the control plane, and prints the access URL.

See [Single-Host RPM Evaluation Quickstart](https://docs.api7.ai/api7-gateway/install/rpm-quickstart.md) for the dedicated evaluation workflow, including container-based evaluation.

## Method B: Standard Deployment for Production[​](#method-b "Direct link to Method B: Standard Deployment for Production")

### Prepare PostgreSQL[​](#prepare-postgresql "Direct link to Prepare PostgreSQL")

The control plane needs a PostgreSQL (13+, 15 recommended). The schema is migrated automatically when the control plane starts, with no manual table creation. If you already have an instance, skip to [Create database and role](#create-db).

#### Install[​](#install "Direct link to Install")

Online host:

```
sudo dnf -y module enable postgresql:15   # required on RHEL/Rocky 8; optional on 9

sudo dnf -y install postgresql-server
```

Offline host: download the RPMs on a same-version online machine, then copy them over and install:

```
# online machine

sudo dnf -y module enable postgresql:15    # required on RHEL/Rocky 8, else you get the default PG 10 (< 13)

sudo dnf install -y --downloadonly --downloaddir=./pg-rpms postgresql-server

# target machine (after copying in pg-rpms/)

sudo dnf -y localinstall ./pg-rpms/*.rpm --disablerepo='*'
```

#### Initialize and Start PostgreSQL[​](#initialize-and-start-postgresql "Direct link to Initialize and Start PostgreSQL")

Initialize the PostgreSQL data directory, then start the service:

```
sudo /usr/bin/postgresql-setup --initdb

sudo systemctl enable --now postgresql
```

#### Create Database and Role[​](#create-db "Direct link to Create Database and Role")

Create the database user and database used by the control plane:

```
sudo -u postgres psql <<'SQL'

CREATE USER api7ee WITH PASSWORD 'YourStrongPassword';

CREATE DATABASE api7ee OWNER api7ee;

SQL
```

#### Enable Password Authentication[​](#enable-password-authentication "Direct link to Enable Password Authentication")

The control plane connects with "username + password + TCP," but the stock PostgreSQL on RHEL defaults local TCP to `ident`, which makes the connection fail. Edit `/var/lib/pgsql/data/pg_hba.conf` and add these lines before the generic rules:

```
host    api7ee    api7ee    127.0.0.1/32    scram-sha-256

host    api7ee    api7ee    ::1/128         scram-sha-256
```

If the DB and the control plane are on separate hosts, also set `listen_addresses = '*'` in `postgresql.conf`, add the control-plane subnet to `pg_hba.conf` (e.g. `host api7ee api7ee 10.0.0.0/24 scram-sha-256`), and open port 5432 in the firewall.

Reload PostgreSQL after editing:

```
sudo systemctl reload postgresql
```

#### Verify and Record the Connection String[​](#verify-and-record-the-connection-string "Direct link to Verify and Record the Connection String")

Confirm that the new database credentials work:

```
PGPASSWORD='YourStrongPassword' psql -h 127.0.0.1 -U api7ee -d api7ee -c '\conninfo'
```

Use this connection string in the next step: `postgres://api7ee:YourStrongPassword@<PG_HOST>:5432/api7ee`. If the password contains special characters such as `@`, colon (`:`), slash (`/`), or question mark (`?`), URL-encode them. For example, `@` becomes `%40`.

### Install Packages[​](#install-packages "Direct link to Install Packages")

Run once on the CP host and once on the DP host:

```
tar -xzf api7-ee-rpm-<version>-<dist>.<arch>.tar.gz --no-same-owner

cd api7-ee-rpm-<version>-<dist>.<arch>/

sudo ./install.sh         # equivalent to dnf -y localinstall ./*.rpm --disablerepo='*'
```

The `--no-same-owner` option makes the extracted files belong to the user who extracts them. Packages released before v3.10.10 record their files as owned by the build machine's user, and `tar` keeps that owner when it runs as root.

For split deployment: the CP host needs only the two control-plane packages (`api7ee-dp-manager`, `api7ee-dashboard`); the DP host needs only `api7-gateway`. Installing the whole bundle is also supported. Do not start the services you do not need.

### Configure the Control Plane[​](#configure-the-control-plane-cp-host "Direct link to Configure the Control Plane")

Put the database connection string into two configs (both pointing at the same database); leave everything else at the defaults.

Set the same database connection string in `/usr/local/api7/dp-manager/conf/dp-manager.yaml` and `/usr/local/api7/dashboard/conf/dashboard.yaml`:

```
database:

  dsn: "postgres://api7ee:YourStrongPassword@<PG_HOST>:5432/api7ee"
```

The Dashboard serves its embedded UI and API on `7443` with TLS by default. Plain HTTP on `7080` is disabled, and `7081` is the local status port. To use your own certificate, set `server.tls.cert_file` and `server.tls.key_file` in `dashboard.yaml`. When both are empty, the Dashboard generates a self-signed certificate.

### Start the Control Plane[​](#start-the-control-plane-cp-host "Direct link to Start the Control Plane")

Start the two control-plane services and confirm that both are active:

```
sudo systemctl enable --now api7ee-dp-manager

sudo systemctl enable --now api7ee-dashboard

systemctl is-active api7ee-dp-manager api7ee-dashboard   # expect both active
```

Open `7443` for browser access, and `7943` (DP→CP) for split deployment:

```
sudo firewall-cmd --add-port=7443/tcp --add-port=7943/tcp --permanent && sudo firewall-cmd --reload
```

If SELinux is `Enforcing` and a service misbehaves, check `sudo ausearch -m avc -ts recent`; you may temporarily `sudo setenforce 0` to confirm, then configure a proper policy. Do not disable it globally without reason.

### Bootstrap the Dashboard[​](#bootstrap-the-dashboard "Direct link to Bootstrap the Dashboard")

1. Open `https://<CP_HOST>:7443` in a browser (accept the self-signed cert).
2. Log in for the first time with `admin / admin` and change the password as prompted.
3. Go to **Settings → License**, upload the License (contains a `BEGIN CERTIFICATE` segment + a `BEGIN LICENSE` segment), and confirm the status is normal.

### Onboard the Data-Plane Gateway[​](#onboard-dp "Direct link to Onboard the Data-Plane Gateway")

The Dashboard issues the data plane's connection parameters and mTLS certificate centrally. Do not copy them by hand.

If the **Add Instance** dialog asks for the DP Manager (control-plane) endpoint, enter `https://<CP_HOST>:7943`. `<CP_HOST>` is the control-plane IP or hostname reachable from the DP host. Port `7943` is the data-plane mTLS port, and the DP host must be able to reach it.

1. In the Dashboard, go to **Gateway Groups**, select or create a group, and click **Add Instance**.
2. Select **RPM**, choose the certificate validity period, and generate the script.
3. Run the generated script on the DP host after installing the `api7-gateway` RPM. The script writes that gateway group's certificate files and replaces the gateway `config.yaml` with the group's control-plane connection settings, then restarts the gateway service. Selecting a non-default gateway group generates material for that group; do not reuse a script from a different group.

The RPM option is available in API7 Enterprise 3.10.2 and later. For an earlier release, or a customized Dashboard that does not show it, use the [manual Docker-script mapping fallback](https://docs.api7.ai/api7-gateway/install/rpm-from-docker.md).

### Verify the Deployment[​](#verify-the-deployment "Direct link to Verify the Deployment")

```
# DP host

systemctl is-active api7-gateway                                   # active

curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:9080/   # 404 = serving (no route yet)
```

In the Dashboard, open the gateway group → **Instances**: when the instance status is Healthy (heartbeat + config sync both succeeded), the deployment is complete. After that, publish routes/services in the Dashboard and the data plane syncs them automatically.

## Install Prometheus[​](#metrics-prometheus "Direct link to Install Prometheus")

The dashboard's metrics and analytics are not stored in the dp-manager. The gateway pushes metric blocks to the dp-manager, which remote-writes them to a Prometheus instance. Prometheus is a required external service and is not included in the RPM bundle. Install and run Prometheus, then point the dp-manager at it.

1. Install Prometheus on the CP host (or a reachable host) and start it with the remote-write receiver enabled:

   ```
   prometheus --web.enable-remote-write-receiver   # Prometheus v2.54+

   # older builds: --enable-feature=remote-write-receiver
   ```

2. Configure the dp-manager to use your Prometheus instance:

   ```
   prometheus:

     addr: "http://127.0.0.1:9090"   # your Prometheus address

     remote_write_path: "/api/v1/write"
   ```

   Restart the dp-manager after saving the configuration:

   ```
   systemctl restart api7ee-dp-manager
   ```

Until Prometheus is installed and configured, the dashboard shows no traffic metrics and the gateway logs `agent.lua:544: upload metrics block failed, status: 500`. This is expected when Prometheus is absent; proxying and instance health are unaffected.

## Operations Reference[​](#operations-reference "Direct link to Operations Reference")

### File Layout After Installation[​](#paths-quick-reference "Direct link to File Layout After Installation")

After installation, the file layout is:

```
/usr/local/api7/              # control plane

├── dp-manager/               # binaries and configuration

└── dashboard/                # dashboard binary and configuration



/usr/local/apisix/            # data plane gateway

├── conf/                     # config.yaml and onboarding certs/params

└── logs/                     # gateway logs



/usr/local/openresty/         # bundled OpenResty runtime

/usr/bin/apisix               # gateway CLI

/usr/lib/systemd/system/      # systemd unit files

/var/log/api7/                # control-plane logs

/var/lib/api7/                # control-plane runtime data
```

Common files you may inspect or edit:

| Purpose            | Path                                              |
| ------------------ | ------------------------------------------------- |
| dp-manager config  | `/usr/local/api7/dp-manager/conf/dp-manager.yaml` |
| dashboard config   | `/usr/local/api7/dashboard/conf/dashboard.yaml`   |
| gateway config     | `/usr/local/apisix/conf/config.yaml`              |
| control-plane logs | `/var/log/api7/*.log`                             |
| gateway logs       | `/usr/local/apisix/logs/error.log`                |

### Services and Ports[​](#services-and-ports "Direct link to Services and Ports")

| Layer         | Service (systemd)   | Default ports                                              | Main config                                       |
| ------------- | ------------------- | ---------------------------------------------------------- | ------------------------------------------------- |
| Control plane | `api7ee-dp-manager` | 7900 / 7943 (mTLS) / 7901                                  | `/usr/local/api7/dp-manager/conf/dp-manager.yaml` |
| Control plane | `api7ee-dashboard`  | 7443 (embedded UI/API) / 7081. Plain HTTP 7080 is disabled | `/usr/local/api7/dashboard/conf/dashboard.yaml`   |
| Data plane    | `api7-gateway`      | 9080 / 9443 (traffic ingress)                              | `/usr/local/apisix/conf/config.yaml`              |

`api7-gateway` has the compatibility alias `apisix.service` (`systemctl ... apisix` also works).

### Package Behavior[​](#package-behavior "Direct link to Package Behavior")

`dnf upgrade` installs the new RPMs; `%config(noreplace)` keeps your config intact (new defaults are saved as `*.rpmnew`). Restart the affected services after upgrading. Services run under dedicated accounts (control plane `api7`, data plane `apisix`), created automatically at install time.

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

| Symptom                                                           | Where to look                                                                                                                                                                         |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dashboard UI is unavailable                                       | Check `systemctl status api7ee-dashboard` and `/var/log/api7/`; verify that port `7443` is open and the Dashboard TLS configuration is valid                                          |
| Control plane fails to start                                      | Usually the DB is unreachable: check the database connection string, PostgreSQL reachability, that the `api7ee` database/role exist, and that `pg_hba.conf` has password auth enabled |
| Data-plane instance `OutOfSync` or cannot reach the control plane | Usually DP→CP `7943` is unreachable, or the cert and connection parameters come from different environments; re-run the Dashboard-generated onboarding script                         |
| Offline install reports `nothing provides which/libxslt`          | You have a slim package without the dependencies; use the official full bundle instead                                                                                                |
| `System has not been booted with systemd as init system`          | The host/container is not running systemd as PID 1; API7 EE runs as systemd services (see [System requirements](#system-requirements) / [Method A](#method-a))                        |

## Uninstall[​](#uninstall "Direct link to Uninstall")

Stop the services and remove the RPM packages:

```
sudo systemctl disable --now api7-gateway api7ee-dashboard api7ee-dp-manager

sudo dnf -y remove api7-gateway api7ee-dashboard api7ee-dp-manager

# config and data remain under /usr/local/api7, /usr/local/apisix, /var/log/api7, /var/lib/api7; clean up manually as needed
```
