规划
主机 | 角色 | 备注 |
---|---|---|
node1 | master | |
node2 | dnode | |
node3 | dnode |
下载安装包
wget https://www.taosdata.com/assets-download/TDengine-server-2.4.0.7-Linux-x64.tar.gz
tar -xvf TDengine-server-2.4.0.7-Linux-x64.tar.gz
cd tdengine
./install.sh
配置 vim /etc/taos/taos.cfg
#serverPort 6030 默认
firstEp node1:6030 #所有的dn节点都要一致找主节点
fqdn node1
logDir /app/tdengine/logs/
dataDir /app/tdengine/data/
numOfThreadsPerCore 2.0
ratioOfQueryCores 2.0
numOfCommitThreads 4.0
minTablesPerVnode 1000
tableIncStepPerVnode 1000
minRows 100
keepColumnName 1
balance 0
blocks 6
maxSQLLength 1048576
maxNumOfOrderedRes 100000
update 1
cachelast 1
timezone Asia/Shanghai (CST, +0800)
locale en_US.UTF-8
charset UTF-8
maxShellConns 50000
maxConnections 50000
monitor 1
restfulRowLimit 10240
logKeepDays -1
debugflag 130
备注
:如果dn节点加入失败,需要删除dataDir数据调整配置重新启动服务
启动服务
systemctl start taosd
添加节点
toas #进入sql命令模式
create dnode 'node2:6030'
启动辅助服务
systemctl start taosadapter
访问
jdbc:TAOS-RS://node1:6041/
创建用户
CREATE USER weijian PASS ‘123456’
GRANT ALL ON test.* TO weijian;
网友评论