命令行工具
预构建二进制文件中的命令行 greptime 可以启动/停止 GreptimeDB 并传递配置选项。
help 列出了 greptime 的所有命令和选项。
sh
1. $ greptime help
2. greptimedb
4. USAGE:
5. greptime [OPTIONS] <SUBCOMMAND>
7. OPTIONS:
8. -h, --help Print help information
9. --log-dir <LOG_DIR> [default: /tmp/greptimedb/logs]
10. --log-level <LOG_LEVEL> [default: info]
12. SUBCOMMANDS:
13. datanode
14. frontend
15. help Print this message or the help of the given subcommand(s)
16. metasrv
17. standalone
--log-dir=[dir]specify logs directory,/tmp/greptimedb/logsby default.--log-level=[info | debug | error | warn]specify the log level,infoby default.
以独立模式启动 GreptimeDB:
sh
1. greptime --log-dir=/tmp/greptimedb/logs --log-level=info standalone start -c config/standalone.example.toml
-c 指定配置文件,更多信息请查看配置。
以分布式模式启动 GreptimeDB:
启动 meta server:
sh
1. greptime metasrv start -c config/metasrv.example.toml
使用配置文件启动 datanode 实例:
sh
1. greptime datanode start -c config/datanode.example.toml
使用命令行参数启动 datanode 实例:
sh
1. greptime datanode start --rpc-addr=0.0.0.0:4100 --mysql-addr=0.0.0.0:4102 --metasrv-addr=0.0.0.0:3002 --node-id=1
使用配置文件启动 frontend 实例:
sh
1. greptime frontend start -c config/frontend.example.toml
使用命令行参数启动 frontend 实例:
sh
1. greptime frontend start --metasrv-addr=0.0.0.0:3002
