@TOC
download TDengine
https://github.com/taosdata/TDengine
一、安装教程(以下操作均在root权限下执行)
-
Check cmake version(use CMake 2.8 or higher versions in the project directory)
cmake --version
-
如未安装cmake,下面是安装cmake过程
check gcc version
gcc --version
gcc (SUSE Linux) 4.3.4
check g++ version
g++ --version
g++ (SUSE Linux) 4.3.41). 安装最新版本cmake3.15.1, 下载文件 cmake-3.15.1.tar.gz, 解压
tar -zxvf cmake-3.15.1.tar.gz
./bootstrap 一下
cd cmake-3.15.1
./bootstrap报错信息如下:
./bootstrap error2). 报错的信息大概就是G++没有什么的balabala,然后跑去升级gcc(新版本的gcc是包含g++的),安装gcc的血泪史可以写好几十页了,只不过这个是错误的方向,这里就不详细写了。
请教了linux 大神后,得到的解决方法是更换低版本的cmake。
如法炮制,先后尝试安装cmake-3.14.6、cmake-3.11.4,均在./bootstrap产生error,与上述error一致。尝试安装cmake-3.6.3,./bootstrap 成功,详细步骤如下:tar -zxvf cmake-3.6.3.tar.gz
cd cmake-3.6.3
./bootstrap
gmake (这个时间稍微有点长)
gmake install (这个很快了)OK,cmake3.6.3安装完毕。
-
将TDengine-master文件夹放到Linux系统目录下,执行以下操作:
mkdir build && cd build
cmake … && cmake --build .
echo -e “dataDir $(pwd)/test/data\nlogDir $(pwd)/test/log” > test/cfg/taos.cfgTo start the TDengine server, run the command below in terminal:
./build/bin/taosd -c test/cfg
In another terminal, use the TDengine shell to connect the server:
./build/bin/taos -c test/cfg
OK, # Installing
After building successfully, TDengine can be installed by:make install
安装成功后,如果想 Start the service in the terminal. 直接在命令行输入
taosd
连接 TDengine service 使用命令:
taos
-
Try TDengine
create database db;
use db;
create table t (ts timestamp, a int);
insert into t values (‘2019-07-15 00:00:00’, 1);
insert into t values (‘2019-07-15 01:00:00’, 2);
select * from t;
drop database db;