# Zabbix mirror (pkg.shecan.ir)

> Mirror of repo.zabbix.com with its paths: /zabbix/<version>/<distro> (apt for Ubuntu, Debian (arm64: ubuntu-arm64, debian-arm64) and Raspberry Pi OS; rpm for RHEL, AlmaLinux, Rocky, Oracle, Amazon Linux and SLES), /zabbix-tools, /zabbix-agent2-plugins, /non-supported and the signing keys at the root (zabbix-official-repo.key, RPM-GPG-KEY-ZABBIX-*).

- Upstream: repo.zabbix.com
- Mirror URL: <https://mirror-zabbix.pkg.shecan.ir/>
- Clients: apt, dnf, yum
- Service status: <https://pkg.shecan.ir/status.json> (key `zabbix`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/zabbix/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/zabbix.json>

## Limitations

- apt and dnf still verify Zabbix's signature. The guide installs 7.0 LTS; 7.4 and 8.0 live under /zabbix/<version>/stable/ and /zabbix/8.0/release/ (replace the path, the key is the same).
- The zabbix-release packages are not used: their source files name repo.zabbix.com. Write the source file as shown instead.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### apt: persistent (user- or system-wide configuration)

Run, Ubuntu or Debian (linux)

```sh
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/zabbix.asc https://mirror-zabbix.pkg.shecan.ir/zabbix-official-repo.key
. /etc/os-release
[ "$(dpkg --print-architecture)" = arm64 ] && arch=-arm64 || arch=
echo "deb [signed-by=/etc/apt/keyrings/zabbix.asc] https://mirror-zabbix.pkg.shecan.ir/zabbix/7.0/$ID$arch $VERSION_CODENAME main
deb [signed-by=/etc/apt/keyrings/zabbix.asc] https://mirror-zabbix.pkg.shecan.ir/zabbix-tools/debian-ubuntu $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/zabbix.list
sudo apt update && sudo apt install -y zabbix-agent2
```

Undo / restore the default, Ubuntu or Debian (linux)

```sh
sudo rm -f /etc/apt/sources.list.d/zabbix.list /etc/apt/keyrings/zabbix.asc
sudo apt update
```

Run, Debian (linux)

```sh
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/zabbix.asc https://mirror-zabbix.pkg.shecan.ir/zabbix-official-repo.key
. /etc/os-release
[ "$(dpkg --print-architecture)" = arm64 ] && arch=-arm64 || arch=
echo "deb [signed-by=/etc/apt/keyrings/zabbix.asc] https://mirror-zabbix.pkg.shecan.ir/zabbix/7.0/$ID$arch $VERSION_CODENAME main
deb [signed-by=/etc/apt/keyrings/zabbix.asc] https://mirror-zabbix.pkg.shecan.ir/zabbix-tools/debian-ubuntu $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/zabbix.list
sudo apt update && sudo apt install -y zabbix-agent2
```

Undo / restore the default, Debian (linux)

```sh
sudo rm -f /etc/apt/sources.list.d/zabbix.list /etc/apt/keyrings/zabbix.asc
sudo apt update
```

### dnf, yum: persistent (user- or system-wide configuration)

Configuration file (linux): `/etc/yum.repos.d/zabbix.repo`

```ini
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirror-zabbix.pkg.shecan.ir/zabbix/7.0/rhel/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirror-zabbix.pkg.shecan.ir/RPM-GPG-KEY-ZABBIX-B5333005

[zabbix-tools]
name=Zabbix Official Repository (tools) - $basearch
baseurl=https://mirror-zabbix.pkg.shecan.ir/zabbix-tools/rhel/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirror-zabbix.pkg.shecan.ir/RPM-GPG-KEY-ZABBIX-TOOLS
```

Undo / restore the default (linux)

```sh
sudo rm -f /etc/yum.repos.d/zabbix.repo
sudo dnf clean all
```

### dnf: persistent (user- or system-wide configuration)

Run (linux) (checked by hand)

```sh
sudo dnf install -y zabbix-agent2
```
