Background

ZeroTier One 的包在 v3.17 之后就因软件包 License 问题就从 community 仓库删除了,而且官方也没有提供 Alpine Linux 的软件包

又双叒叕因为 Alpine Linux 是基于 musl 而非 libc,所以需要我们自己手动编译

太长不看版

为了节省时间,我自建了一个 ZeroTier for Alpine Linux 的源,复制粘贴下面三条指令即可通过软件包管理器安装:

  1. 添加公钥(自建仓库):

    #
  2. 添加源:

    #
  3. 更新 & 安装:

    #

其他信息请到 https://mirror.vconet.top 查看

自建源
自建源

手动编译

准备环境

如果你的 Alpine

Linux 实例性能不够,请使用虚拟机或 Docker/Podman 先创建一个 Alpine Linux 环境

准备源码

1
2
3
4
5
wget https://github.com/zerotier/ZeroTierOne/archive/refs/tags/1.16.0.tar.gz

tar xvf 1.16.0.tar.gz

cd ZeroTierOne-1.16.0

安装依赖

#

编译

#

使用

在 Alpine Linux 实例上安装必要的依赖:

#

建议把编译好的 zerotier-onezerotier-clizerotier-idtool 上传到 Alpine Linux 的 /usr/sbin 下,搭配下面的 OpenRC 脚本使用:

1
2
3
4
5
6
7
8
9
10
#!/sbin/openrc-run

depend() {
need net
after firewall
}

command="/usr/sbin/zerotier-one"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"