目录

下载latest版本

配置Brook节点的步骤如下: 安装Brook 在Linux或macOS上安装Brook: gunzip brook-latest-linux-amd64.gz chmod +x brook-latest-linux-amd64 启动Brook节点 执行以下命令启动节点,并指定配置文件: ./brook-latest-linux-amd64 server -config config.json 配置配置文件 创建或编辑config.json文件: { "node_id": "your-node-id", "address": "...", "port": 800, "heartbeats": 30, "timer": 100, "max_tasks": 100, "task_timeout": 300, "log_level": "debug", "auth": { "strategy": "file", "file": "auth.json" }, "logging": { "main": "debug.log", "access": "access.log" } } 启动节点 执行: ./brook-latest-linux-amd64 server -config config.json 添加任务 使用brokectl命令添加任务: brokectl add --name "task1" --command "echo hello" 查看任务状态 列出所有任务: brokectl list 安全配置 设置认证策略和日志目录:...

配置Brook节点的步骤如下:

安装Brook

在Linux或macOS上安装Brook:

gunzip brook-latest-linux-amd64.gz
chmod +x brook-latest-linux-amd64

启动Brook节点

执行以下命令启动节点,并指定配置文件:

./brook-latest-linux-amd64 server -config config.json

配置配置文件

创建或编辑config.json文件:

{
  "node_id": "your-node-id",
  "address": "...",
  "port": 800,
  "heartbeats": 30,
  "timer": 100,
  "max_tasks": 100,
  "task_timeout": 300,
  "log_level": "debug",
  "auth": {
    "strategy": "file",
    "file": "auth.json"
  },
  "logging": {
    "main": "debug.log",
    "access": "access.log"
  }
}

启动节点

执行:

./brook-latest-linux-amd64 server -config config.json

添加任务

使用brokectl命令添加任务:

brokectl add --name "task1" --command "echo hello"

查看任务状态

列出所有任务:

brokectl list

安全配置

设置认证策略和日志目录:

"auth": {
  "strategy": "file",
  "file": "auth.json"
},
"logging": {
  "main": "/var/log/brook/debug.log",
  "access": "/var/log/brook/access.log"
}

监控节点

检查节点状态:

curl http://localhost:800/api/nodes

注意事项

  • 确保配置文件路径正确。
  • 查看Brook文档获取更多配置选项和故障排除信息。
  • 如果节点无法启动,查看日志文件debug.log以获取错误信息。

下载latest版本

扫描二维码推送至手机访问。

本文转载自互联网,如有侵权,联系删除。

本文链接:https://wap.astrillvpn-m.com.cn/post/9844.html

扫描二维码手机访问

文章目录
网站地图