好不容易把zerotier打通之后,发现遇到某些无法p2p的场景下,速度慢的感人,稍微去翻阅了下官方文档,发现了个Moon服务端,可以通过自建中转服务器使用,这样就可以绕过p2p限制。
本篇使用环境为Pve 下的LXC容器,使用镜像为Debian 10
先安装个ZeroTier
apt-get update -y apt-get install curl -y curl -s https://install.zerotier.com |bash
报错了,貌似缺少gnupg, gnupg2 and gnupg1这其中一个软件包
root@ZeroTier-Moon:~# curl -s https://install.zerotier.com | bash *** ZeroTier One Quick Install for Unix-like Systems *** Tested distributions and architectures: *** MacOS (10.7+) on x86_64 (just installs ZeroTier One.pkg) *** Debian (7+) on x86_64, x86, arm, and arm64 *** RedHat/CentOS (6+) on x86_64 and x86 *** Fedora (16+) on x86_64 and x86 *** SuSE (12+) on x86_64 and x86 *** Mint (18+) on x86_64, x86, arm, and arm64 *** Please report problems to contact@zerotier.com and we will try to fix. *** Detecting Linux Distribution *** Found Debian "buster", or "sid" (or similar), creating /etc/apt/sources.list.d/zerotier.list E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation *** Installing zerotier-one package... Hit:1 http://security.debian.org buster/updates InRelease Hit:2 http://ftp.debian.org/debian buster InRelease Get:3 http://download.zerotier.com/debian/buster buster InRelease [36.8 kB] Hit:4 http://ftp.debian.org/debian buster-updates InRelease Err:3 http://download.zerotier.com/debian/buster buster InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1657198823E52A61 Reading package lists... Done W: GPG error: http://download.zerotier.com/debian/buster buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1657198823E52A61 E: The repository 'http://download.zerotier.com/debian/buster buster InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package zerotier-one *** Package installation failed! Unfortunately there may not be a package *** for your architecture or distribution. For the source go to: *** https://github.com/zerotier/ZeroTierOne
安装下gnupg2吧
apt-get intsall gnupg2 -y
然后再重新执行下curl
curl -s https://install.zerotier.com | bash
安装完后,底下会显示*** Success! You are ZeroTier address字样
然后执行个命令看看有无正确安装成功:
zerotier-cli -v root@ZeroTier-Moon:~# zerotier-cli -v 1.6.5
不出意外的话,应该和我显示差不多。
生成个moon模板:
cd /var/lib/zerotier-one zerotier-idtool initmoon identity.public > moon.json