为什么是又呢,因为前几天刚编译了一份opentracker的二进制文件.
据说这个是比opentracker性能还要强,且支持ws和wss协议的tracker服务.基于rust编写的,想着为了方便自己,就编译了一份二进制文件开箱即用
地址:
https://github.com/bigcaibao/Aquatic-Tracker-Binaries

来个简要的安装说明吧

wget https://github.com/bigcaibao/Aquatic-Tracker-Binaries/releases/download/0.9.0/aquatic_0.9.0.tar.gz
tar -xzf aquatic_0.9.0.tar.gz && rm aquatic_0.9.0.tar.gz
chmod +x aquatic/*
cd aquatic
./aquatic_http -c "aquatic-http-config.toml"
./aquatic_udp -c "aquatic-udp-config.toml"
./aquatic_ws -c "aquatic-ws-config.toml"

理论上到,这就启用完成了..HTTP走的是3000端口,UDP走的是3001,WS走的是3002端口,但是嘛..怕万一有小白看到说怎么在后台运行呢..
你可以创建一个systemd服务

sudo nano /etc/systemd/system/aquatic.service
[Unit]
Description=Aquatic BitTorrent Tracker
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/你的路径/aquatic
ExecStart=/bin/bash -c 'cd /你的路径/aquatic && ./aquatic_udp -c "aquatic-udp-config.toml" && ./aquatic_http -c "aquatic-http-config.toml" && ./aquatic_ws -c "aquatic-ws-config.toml"'
Restart=always
RestartSec=3
LimitMEMLOCK=65536000
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

如果觉得nano都太麻烦,哪来个一键的吧.

echo -e "[Unit]\nDescription=Aquatic BitTorrent Tracker\nAfter=network.target\n\n[Service]\nType=simple\nUser=root\nWorkingDirectory=/你的路径/aquatic\nExecStart=/bin/bash -c 'cd /你的路径/aquatic && ./aquatic_udp -c \"aquatic-udp-config.toml\" && ./aquatic_http -c \"aquatic-http-config.toml\" && ./aquatic_ws -c \"aquatic-ws-config.toml\"'\nRestart=always\nRestartSec=3\nLimitMEMLOCK=65536000\nStandardOutput=journal\nStandardError=journal\n\n[Install]\nWantedBy=multi-user.target" | sudo tee /etc/systemd/system/aquatic-tracker.service > /dev/null
sudo systemctl daemon-reload

然后...

#设置开机自启
sudo systemctl enable aquatic.service
#启动
sudo systemctl start aquatic.service
#停止
sudo systemctl stop aquatic.service
#查看状态
sudo systemctl status aquatic.service
#重启
sudo systemctl restart aquatic.service

需要注意的

默认toml配置文件我都准备好了,建议在使用之前看一看,里面都写的是中文,片段如下:

# Log level. Available values are off, error, warn, info, debug and trace.
# 日志级别。可用值包括:off(关闭)、error(错误)、warn(警告)、info(信息)、debug(调试)和trace(跟踪)。
log_level = "warn"

[network]
# Bind to this address
# 绑定到此地址
address = "0.0.0.0:3002"

# Only allow access over IPv6
# 仅允许IPv6访问
only_ipv6 = false

# Maximum number of pending TCP connections
# 最大待处理TCP连接数
tcp_backlog = 1024

建议自己看看,修改了再启动服务.