未验证 提交 75a5d472 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

enh: add build.sh to build TDengine and taosTools in a single command (#12646)

* enh: move taosdemo in rpm and deb

[TD-15642]

* update taos-tools

* enh: add build.sh to build TDengine and taosTools in one command

[TD-15642]
上级 469d5991
......@@ -154,12 +154,23 @@ git submodule update --init --recursive
### Linux 系统
可以运行代码仓库中的 `build.sh` 脚本编译出 TDengine 和 taosTools(包含 taosBenchmark 和 taosdump)。
```bash
mkdir debug && cd debug
cmake .. && cmake --build .
./build.sh
```
这个脚本等价于执行如下命令:
```bash
git submodule update --init --recursive
mkdir debug
cd debug
cmake .. -DBUILD_TOOLS=true
make
```
您可以选择使用 jemalloc 作为内存分配器,替代默认的 glibc:
可以选择使用 jemalloc 作为内存分配器,替代默认的 glibc:
```bash
apt install autoconf
......
......@@ -38,7 +38,7 @@ for details. The documentation from our website can also be downloaded locally f
# Building
At the moment, TDengine only supports building and running on Linux systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or from the source code. This quick guide is for installation from the source only.
At the moment, TDengine server only supports running on Linux systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or build it from the source code. This quick guide is for installation from the source only.
To build TDengine, use [CMake](https://cmake.org/) 3.0.2 or higher versions in the project directory.
......@@ -169,9 +169,20 @@ You can modify the file ~/.gitconfig to use ssh protocol instead of https for be
### On Linux platform
You can run the bash script `build.sh` to build both TDengine and taosTools including taosBenchmark and taosdump as below:
```bash
mkdir debug && cd debug
cmake .. && cmake --build .
./build.sh
```
It equals to execute following commands:
```bash
git submodule update --init --recursive
mkdir debug
cd debug
cmake .. -DBUILD_TOOLS=true
make
```
Note TDengine 2.3.x.0 and later use a component named 'taosAdapter' to play http daemon role by default instead of the http daemon embedded in the early version of TDengine. The taosAdapter is programmed by go language. If you pull TDengine source code to the latest from an existing codebase, please execute 'git submodule update --init --recursive' to pull taosAdapter source code. Please install go language version 1.14 or above for compiling taosAdapter. If you meet difficulties regarding 'go mod', especially you are from China, you can use a proxy to solve the problem.
......
#!/bin/bash
git submodule update --init --recursive > /dev/null || echo -e "failed to update git submodule"
if [ ! -d debug ]; then
mkdir debug || echo -e "failed to make directory build"
fi
cd build && cmake .. -DBUILD_TOOLS=true && make
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册