title: zerotier:安装moon节点
tags: []
id: '1893'
categories:
- - 运维
date: 2022-06-25 18:16:30
---
来源
https://github.com/rwv/docker-zerotier-moon
https://github.com/kaaass/ZerotierFix
https://post.smzdm.com/p/adwrepgk
https://github.com/docker/compose/releases/
https://rmbz.net/archives/zerotier-moon-orbit-config
第一步 安装docker
- 阿里云 centos
- sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
- sudo yum install -y yum-utils device-mapper-persistent-data lvm2
- sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
- sudo yum makecache fast
- sudo yum install docker-ce docker-ce-cli containerd.io
- systemctl start docker
- systemctl enable docker
- DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
- mkdir -p $DOCKER_CONFIG/cli-plugins
- sudo curl -L "https://get.daocloud.io/docker/compose/releases/download/v2.6.1/docker-compose-$(uname -s)-$(uname -m)" -o $DOCKER_CONFIG/cli-plugins/docker-compose
- chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
- $DOCKER_CONFIG/cli-plugins/docker-compose --version
- ln -s $DOCKER_CONFIG/cli-plugins/docker-compose /usr/local/bin/
- docker-compose --version
第二步 docker安装moon节点
version: "3"
services:
zerotier-moon:
image: seedgou/zerotier-moon
container_name: "zerotier-moon"
restart: always
ports:
- "9993:9993/udp"
volumes:
- ./config:/var/lib/zerotier-one
entrypoint:
- /startup.sh
- "-4"
- 1.2.3.4
- 1.2.3.4 替换成moon节点的公网ip
- mkdir zerotier_moon
- cd zerotier_moon
- nano -K docker-compose.yml
- # dos2unix docker-compose.yml
- docker-compose up -d
- docker-compose logs
- 防火墙开放对应端口的udp
第三步 openwrt增加moon节点
- docker-compose logs 获得 zerotier-cli orbit (通常这两个值是一样的)
- 登录openwrt,执行 vi /etc/init.d/zerotier
- 在 start_service中的最后加入 zerotier-cli orbit 命令
- 执行 zerotier-cli orbit
- 查看moon节点是否添加 zerotier-cli listpeers
第四步 安卓增加moon节点