mirror of
https://github.com/openziti/zrok.git
synced 2024-11-29 11:34:07 +01:00
127 lines
2.9 KiB
Plaintext
127 lines
2.9 KiB
Plaintext
---
|
|
title: Install zrok in Linux
|
|
sidebar_label: Linux
|
|
---
|
|
|
|
import { AssetsProvider } from '@site/src/components/assets-context';
|
|
import DownloadCard from '@site/src/components/download-card';
|
|
import styles from '@site/src/css/download-card.module.css';
|
|
|
|
## Extract Distribution
|
|
|
|
<AssetsProvider>
|
|
<div className={styles.downloadContainer}>
|
|
<DownloadCard
|
|
osName="Linux"
|
|
osLogo="/img/logo-linux.svg"
|
|
/>
|
|
</div>
|
|
</AssetsProvider>
|
|
|
|
## 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> |