TDengine:从源码构建服务环境

sudo apt-get updatesudo apt-get install -y gcc cmake build-essential git libjansson-dev \libsnappy-dev liblzma-dev zlib1g-dev pkg-config libtool autoconf automake groff
git switch -c ver-3.4.0.9
cmake -B buildcmake --build buildcmake --build build/ --target install
Install the project...-- Install configuration: ""make install script: /data/gaoyong/quotes_storage/TDengine/packaging/tools/make_install.shthis is ubuntu systemsource directory: /data/gaoyong/quotes_storage/TDenginebinary directory: /data/gaoyong/quotes_storage/TDengine/buildStart to install TDengine...[sudo] password for gauss:Created symlink /etc/systemd/system/multi-user.target.wants/taosd.service → /etc/systemd/system/taosd.service.TDengine is installed successfully!To configure TDengine : edit /etc/taos/taos.cfgTo start TDengine : sudo systemctl start taosdTo access TDengine : use taos in shellTDengine is installed successfully!
echo 'export PATH=/usr/local/taos/bin:$PATH' >> ~/.bashrcsource ~/.bashrcsudo systemctl start taosdsudo lsof -i -P -n | grep taosdtaos

The TDengine TSDB CLI supports the following commands:----- A -----alter database <db_name> <db_options>alter dnode <dnode_id> 'resetlog';alter dnode <dnode_id> 'monitor' '0';alter dnode <dnode_id> 'monitor' "1";alter dnode <dnode_id> "debugflag" "143";alter dnode <dnode_id> 'asynclog' '0';alter dnode <dnode_id> 'asynclog' "1";alter all dnodes "monitor" "0";alter all dnodes "monitor" "1";alter all dnodes "resetlog";alter all dnodes "debugFlag"alter all dnodes "asynclog" "0";alter all dnodes "asynclog" "1";alter table <tb_name> <tb_actions> ;alter local "resetlog";alter local "DebugFlag" "143";alter local "asynclog" "0";alter local "asynclog" "1";alter topicalter user <user_name> <user_actions> ...----- C -----create table <tb_name> using <stb_name> tags ...create vtable <tb_name> using <stb_name> tags ...create database <db_name> <db_options> ...create dnode "fqdn:port" ...create index <index_name> on <stb_name> (tag_column_name);create mnode on dnode <dnode_id> ;create qnode on dnode <dnode_id> ;create bnode on dnode <dnode_id> ;create anode "node_url" ;create stream <stream_name> into <stb_name> as select ...create topic <topic_name> as select ...create function <udf_name> as <file_name> outputtype <data_types> language 'C' | 'Python' ;create aggregate function <udf_name> as <file_name> outputtype <data_types> bufsize <bufsize_bytes> language 'C' | 'Python';create user <user_name> pass <password> ...----- D -----describe <all_table>delete from <all_table> where ...drop database <db_name>;drop table <all_table>;drop dnode <dnode_id>;drop mnode on dnode <dnode_id> ;drop qnode on dnode <dnode_id> ;drop bnode on dnode <dnode_id> ;drop anode <anode_id> ;drop user <user_name> ;drop function <udf_name>;drop consumer group ...drop topic <topic_name> ;drop stream <stream_name> ;drop index <index_name>;drop tsma <tsma_name> ;drop rsma <rsma_name> ;----- E -----explain select clause ...----- F -----flush database <db_name>;----- H -----help;----- I -----insert into <tb_name> values(...) ;insert into <tb_name> using <stb_name> tags(...) values(...) ;----- G -----grant all on <priv_level> to <user_name> ;grant read on <priv_level> to <user_name> ;grant write on <priv_level> to <user_name> ;----- K -----kill connection <connection_id>;kill query <query_id>;kill retention <retention_id>;kill transaction <transaction_id>;----- P -----pause stream <stream_name>;----- R -----resume stream <stream_name>;reset query cache;restore dnode <dnode_id> ;restore vnode on dnode <dnode_id> ;restore mnode on dnode <dnode_id> ;restore qnode on dnode <dnode_id> ;revoke all on <priv_level> from <user_name> ;revoke read on <priv_level> from <user_name> ;revoke write on <priv_level> from <user_name> ;----- S -----select * from <all_table> where ...select client_version();select current_user();select database();select server_version();select server_status();select now();select today();select timezone();set max_binary_display_width ...show apps;show alive;show anodes;show anodes full;show create database <db_name>;show create stable <stb_name>;show create table <tb_name>;show connections;show cluster;show cluster alive;show cluster machines;show databases;show dnodes;show dnode <dnode_id> variables;show disk_info;show functions;show licences;show mnodes;show queries;show query <query_id> ;show qnodes;show bnodes;show retentions;show retention <retention_id>;show scans;show scan <scan_id>;show snodes;show stables;show stables likeshow streams;show scores;show subscriptions;show tables;show tables likeshow table distributed <all_table>;show tags from <tb_name>show tags from <db_name>show table tags from <all_table>show topics;show transactions;show tsmas;show rsmas;show roles;show role privileges;show role column privileges;show users;show users full;show user privileges;show user column privileges;show variables;show local variables;show vnodes;show vnodes on dnode <dnode_id>;show vgroups;show vtables;show consumers;show grants;show grants full;show grants logs;----- T -----trim database <db_name>;----- U -----update all anodes;update anode <anode_id>;use <db_name>;Timestamp expression Format:b - nanosecondu - microseconda - milliseconds - secondm - minuteh - hourd - dayw - weeknow - current timeExample :select * from t1 where ts > now - 2w + 3d and ts <= now - 1w -2h ;
alter user root pass '123456'
create database db_iot keep 365d replica 1 precision 'ms';-- 创建名为 "iot_data" 的数据库(核心参数说明)CREATE DATABASE IF NOT EXISTS iot_dataKEEP 365d -- 数据保留 1 年(超过 1 年自动删除)REPLICA 1 -- 单副本(社区版不支持多副本)BLOCK_SIZE 4096 -- 数据块大小(默认即可)PRECISION 'ms'; -- 时间戳精度:ms(毫秒),可选 us(微秒)/ns(纳秒)

可参考文档走一边,基本功能。下一步结合具体的场景来评估,看TDENGINE是否适合做行情的存储。
https://docs.taosdata.com/reference/taos-sql/
夜雨聆风