当前位置:网站首页>tdengine集群安装部署
tdengine集群安装部署
2022-04-23 00:53:00 【~Rookie~Newbie~Noob~】
TDengine安装部署
1. 官网下载server和client安装包,保证服务端和客户端的版本一致
server: TDengine-server-2.4.0.16-Linux-x64.tar.gz (15.5 M)
client:TDengine-client-2.4.0.16-Linux-x64-Lite.tar.gz (3.1 M)
2. 集群规划(4台centos7虚拟机)
| pc | ip | hostname |
|---|---|---|
| linux-1 | 192.168.101.78 | h1.taosdata.com |
| linux-2 | 192.168.101.79 | h2.taosdata.com |
| linux-3 | 192.168.101.80 | h3.taosdata.com |
| linux-4 | 192.168.101.81 | 这里可以不配置hostname |
-
配置hostname
编辑 /etc/hostname文件,修改相应虚拟机的hostname并重启 -
编辑每台(4台虚拟机)虚拟机的/etc/hosts文件,加入如下内容:
192.168.101.78 h1.taosdata.com
192.168.101.79 h2.taosdata.com
192.168.101.80 h3.taosdata.com检验相互之间是否可以ping通。
3. 准备工作
1. 关闭防火墙(生产环境不建议)或开放TCP和UDP 6030的4042端口
2. 服务器时钟同步,保证所有服务器时间一样。
4 上传安装包,并解压
- 将TDengine-server-2.4.0.16-Linux-x64.tar.gz (15.5 M) 上传至h1.taosdata.com、h2.taosdata.com、h3.taosdata.com服务器,并解压
tar -xvf TDengine-server-2.4.0.16-Linux-x64.tar.gz - 将TDengine-client-2.4.0.16-Linux-x64-Lite.tar.gz (3.1 M) 上传至 192.168.101.81 服务器并解压
tar -xvf TDengine-client-2.4.0.16-Linux-x64-Lite.tar.gz
5. 安装
- 安装服务端

同样的操作,在 h2.taosdata.com和h3.taosdata.com执行一次。 - 安装客户端

6. 服务端和客户端安装完成后,修改/etc/taos/taos.cfg配置文件
-
服务端配置文件修改:一定要修改的参数firstEp和fqdn
h1.taosdata.com配置:firstEp h1.taosdata.com:6030
fqdn h1.taosdata.comh2.taosdata.com配置:
firstEp h1.taosdata.com:6030
fqdn h2.taosdata.comh3.taosdata.com配置:
firstEp h1.taosdata.com:6030
fqdn h3.taosdata.com -
客户端配置文件,只需要配置firstEp即可
firstEp h1.taosdata.com:6030
启动第一个数据节点
-
在h1.taosdata.com节点上,输入如下命令,启动第一个数据节点:
systemctl start taosd查看节点运行状态,确保节点处于running状态。
systemctl status taosd
-
在192.168.101.81上连接server
taos -h h1.taosdata.com -
执行指令
show dnodes
4.动态加入后续节点。在h2.taosdata.com和h3.taosdata.com上同样执行第1步的操作,确保taos处于running状态。并再次回到192.168.101.81上,执行第3步骤指令。
taos> create dnode "h2.taosdata.com:6030"; taos> create dnode "h3.taosdata.com:6030"; taos> show dnodes;
至此,已经成功搭建了3个节点的 tdengin集群。
Vnode高可用
创建数据库的时候,可用通过REPLICA设置副本数:
CREATE DATABASE testdb REPLICA n;
- n可用设置为1-3,但不能超过节点数。
- 当一个vnode group里一半或者超过一半的vnode不工作时,vnode group是不能对外提供服务的,因为无法从中选出master的。
- 建库时默认的REPLICA是1,此时集群不具备vnode高可用;如果需要高可用,REPLICA应该设为大于等于2的值。

这里看到的,node 的id为3的节点是master节点。
版权声明
本文为[~Rookie~Newbie~Noob~]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_32196893/article/details/124269066
边栏推荐
- idea中使用thymeleaf 模板 <img th:src=“${map.user.headerUrl}“ 报错Cannot resolve ‘user‘
- Getting started with the go language is simple: the sortints method in sort
- This new feature of C 11, I would like to call it the strongest!
- Frequently asked questions about recent BSN development
- L2-035 sequence traversal of complete binary tree (25 points)
- DCB "first brother" xianruida, what does it rely on to raise the value curve?
- Kotlin - 继承 open
- How to become a real digital enterprise? Ruijie network releases the digital force awakening plan
- 牛客NC13251模
- From construction to governance, the industry's first white paper on microservice governance technology was officially released (including a free download link)
猜你喜欢

How to become a real digital enterprise? Ruijie network releases the digital force awakening plan

DCB“一哥”先瑞达,靠什么拉升价值曲线?

命令行修改电脑IP

安全用电管理平台在靖边博物馆安全用电管理系统的应用

396. Rotation function / Sword finger offer II 013 Sum of two-dimensional submatrix

Modify computer IP from the command line
![Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]](/img/40/2b2f869b9f196318d35903444c09c9.png)
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]

Cross domain problem and solving cross domain problem by UMI proxy proxy

The more "intelligent" the machine is, the easier it is for data taggers to be eliminated? Manfu Technology

Selection and evolution of microservices under cloud native architecture
随机推荐
如何成为真正的数字化企业,锐捷网络发布数字原力觉醒计划
Shenkaihong News Studio opened for the first time to witness the whole process of the growth of the times
Lightly: a new generation of cloud IDE
idea中使用thymeleaf 模板 <img th:src=“${map.user.headerUrl}“ 报错Cannot resolve ‘user‘
Why can't the cursor of the next input box enter after entering the previous input box (the cursor can only be clicked in the front part to enter the input box, and the part after the cursor clicks th
[play with lighthouse] build a temporary mailbox system that can be collected and destroyed immediately
C#/. Net uses questpdf operation to generate PDF faster and more efficient!
BUUCTF 穿越时空的思念
L2-012 judgment on heap (25 points) (string bug to be solved)
Software testing immortal documents, even Ali interviewers said it was too detailed. Understanding these directly is P7 level
What is the lifecycle of automated testing?
2.60 - suppose we number the bytes in a W-bit word from 0 (lowest bit) to w / 8 - 1 (highest bit). Write the code of the following C function, which will return an unsigned value, in which byte I of p
L3-1 straight beat Huanglong (30 points) DJK + DFS
This new feature of C 11, I would like to call it the strongest!
ACWing春季每日一题——你知道ABC吗
flask项目跨域拦截处理以及dbm数据库学习【包头文创网站开发】
L2-021 praise crazy devil (25 points)
What is tooljet and how about it—— Evaluation of low code development platform
Multi surveyor Xiao sir_ Senior gold medal lecturer_ Interview questions
Xamarin效果第二十二篇之录音效果