zrok/docs/guides/install/linux.mdx
2023-11-22 23:00:48 -05:00

114 lines
2.6 KiB
Plaintext

---
title: Install zrok in Linux
sidebar_label: Linux
---
import Details from '@theme/MDXComponents/Details';
## Install Linux Package
You can install `zrok` from the Linux package repo with these steps. DEB and RPM packages are available for amd64, arm64, and armv7 architectures.
Check out [the Linux Service guide](/guides/linux-front-door.md) for running `zrok` as a Linux system service.
### Manually add the package repo and install `zrok`
<Details>
<summary>Debian Package Steps</summary>
```text
(set -euo pipefail;
curl -sSLf https://get.openziti.io/tun/package-repos.gpg \
| sudo gpg --dearmor --output /usr/share/keyrings/openziti.gpg;
sudo chmod a+r /usr/share/keyrings/openziti.gpg;
sudo tee /etc/apt/sources.list.d/openziti-release.list >/dev/null <<EOF;
deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main
EOF
sudo apt update;
sudo apt install zrok;
zrok version;
)
```
</Details>
<Details>
<summary>Red Hat Package Steps</summary>
```text
(set -euo pipefail;
sudo tee /etc/yum.repos.d/openziti-release.repo >/dev/null <<\EOF;
[OpenZitiRelease]
name=OpenZiti Release
baseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch
enabled=1
gpgcheck=0
gpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key
repo_gpgcheck=1
EOF
sudo dnf update;
sudo dnf install zrok;
zrok version;
)
```
</Details>
### Run `install.bash` to add the package repo and install `zrok`
1. Download the zrok install script.
```text
curl -sSLfo ./zrok-install.bash https://get.openziti.io/install.bash
```
1. Inspect the script to ensure it is suitable to run as root on your system.
```text
less ./zrok-install.bash
```
1. Run the script as root to add the package repo and install the `zrok` package.
```text
sudo bash ./zrok-install.bash zrok
```
### Raspberry Pi Binary Install
<Details>
<summary>Binary Install script for Linux</summary>
```text
(set -euo pipefail;
cd $(mktemp -d);
ZROK_VERSION=$(
curl -sSf https://api.github.com/repos/openziti/zrok/releases/latest \
| jq -r '.tag_name'
);
case $(uname -m) in
x86_64) GOXARCH=amd64 ;;
aarch64|arm64) GOXARCH=arm64 ;;
armv7|armhf|arm) GOXARCH=arm ;;
*) echo "ERROR: unknown arch '$(uname -m)'" >&2
exit 1 ;;
esac;
curl -sSfL \
"https://github.com/openziti/zrok/releases/download/${ZROK_VERSION}/zrok_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz" \
| tar -xz -f -;
sudo install -o root -g root ./zrok /usr/local/bin/;
zrok version;
)
```
</Details>