当前位置:网站首页>TDengine cluster construction
TDengine cluster construction
2022-07-30 06:48:00 【that's the name】
I use three servers to build a cluster here
1.If it has been installed before on the physical nodes of the clusterTDengine,Uninstall first
直接执行以下4条命令
rmtaos
rm -rf /var/lib/taos
rm -rf /var/log/taos
rm -rf /etc/taos
(参考:https://www.taosdata.com/blog/2019/08/09/566.html)
2.Make sure all hosts in the cluster are on the port 6030-6042 上的 TCP/UDP Protocols can communicate with each other
Execute the following commands on each server individually
firewall-cmd --permanent --zone=public --add-port=6030-6042/tcp
firewall-cmd --permanent --zone=public --add-port=6030-6042/udp
firewall-cmd --reload
3.修改主机名和hosts文件
(1)修改主机名
在三台服务器上分别执行:
hostnamectl set-hostname td1.test.com
hostnamectl set-hostname td2.test.com
hostnamectl set-hostname td3.test.com
Check whether the modification of the host name is successful:
hostname -f
(2)修改hosts文件
vi /etc/hosts
将下面三行添加到hosts文件中(All three hosts do this)
将xxx.xUse your own serverip替换下
192.168.xxx.a td1.test.com
192.168.xxx.b td2.test.com
192.168.xxx.c td3.test.com
Executed on each physical node ping host,其中 host of other physical nodes hostname,确保能 ping through other physical nodes
比如:
在td1.test.com上执行ping td2.test.com,ping td3.test.com
在td2.test.com上执行ping td1.test.com,ping td3.test.com
在td3.test.com上执行ping td1.test.com,ping td2.test.com
ping td2.test.com

4.同步服务器时间
(1)修改时区配置文件
First, you can look at the current time zone configuration
timedatectl

If the current time zone is not the time zone you want,Then modify the time zone configuration file
#删除当前默认时区的配置文件,不建议直接删除(出于操作安全考虑),最好是使用mv命令重命名
rm -rf /etc/localtime
#建立软连接文件到配置文件区,替换掉之前删掉或备份的/etc/localtime 文件
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#查看当前时区
timedatectl
#设置当前时区为上海
timedatectl set-timezone Asia/Shanghai
(2)同步时间
# 安装工具
yum -y install ntp ntpdate
#同步时间服务器
ntpdate cn.pool.ntp.org
5.安装
(1)去官方(https://tdengine.com/all-downloads)下载安装包
After clicking the compressed package to be downloaded, a pop-up window will appear,let you fill in your email,After filling in the email,会收到邮件,The actual download address will be attached to the content of the email,Click the email address in the email content to download.
下载完成后,利用xFtp将压缩包上传到服务器
(2)解压
tar zvxf TDengine-server-2.6.0.1-Linux-x64.tar.gz
(3)安装
cd /TDengine-server-2.6.0.1
./install.sh
安装第一个节点td1When encountering this kind of direct carriage return
Install the second nodetd2和第三个节点td3needs to be filled intd1.test.com:6030(This step can also be directly returned,You can also configure it when you modify the configuration file below
6.配置
输入命令
cd /usr/local/taos/cfg
vi taos.cfg
修改td1配置文件taos.cfg如下(一共修改7处地方,Everywhere I marked with numbers)
td2和td3This also needs to be modified7处,Just the second placefqdn的值不同
td2In the second place, modify it to td2.test.com
td3In the second place, modify it to td3.test.com
7.启动
Execute the command separately on the three servers:
# 启动服务
sudo systemctl start taosd
You can check the status with this command
sudo systemctl status taosd
(进入数据库命令:taos,退出数据库命令:exit)
7.创建节点
在td1或td2或td3上创建dnode节点,It only needs to be created on one node.
我在td1上创建节点
# 进入数据库
taos
# 创建节点
CREATE DNODE "td2.test.com:6030";
CREATE DNODE "td3.test.com:6030";

(1)查看dnode
show dnodes;

(2)查看mnode
show mnodes;

Stop the node running the command
systemctl stop taosd
One of the nodes is down,就是下图这种(Two nodes are down)
参考文章:https://www.wangt.cc/2021/08/tdengine%E7%9A%84%E5%AE%9E%E9%99%85%E4%BD%BF%E7%94%A8/
边栏推荐
- SQL Server database generation and execution of SQL scripts
- CTF之misc-日志分析
- c#下Web3合约空投、转账调用代码
- The Request request body is repackaged to solve the problem that the request body can only be obtained once
- uncategorized SQLException; SQL state [null]; error code [0]; sql injection violation, syntax error
- The most powerful and most commonly used SQL statements in history
- Dcat Admin 安装
- MySQL开窗函数
- MySQL storage engine
- [Mozhe Academy] Identity Authentication Failure Vulnerability Actual Combat
猜你喜欢

FastAPI 快速入门

Detailed MySQL-Explain

php-fpm

运维工程师面试经历

线程的5种状态

【OS】操作系统高频面试题英文版(1)
phpok website vulnerability exploitation analysis

Remember a Mailpress plugin RCE vulnerability recurrence

"MySQL Advanced Chapter" four, the storage structure of the index

Connect to Mysql in the cloud server Docker detailed graphic and text operations (full)
随机推荐
npm run serve starts error npm ERR Missing script "serve"
php-fpm
C#下大批量一键空投实现
DVWA安装教程(懂你的不懂·详细)
CTF之misc-日志分析
mysql删除表中重复数据,(只保留一行)
C#利用开源NPlot实现K线图(蜡烛图)
MySQL 5.7 安装教程(全步骤、保姆级教程)
sql concat() function
[Ten years of network security engineers finishing] - 100 penetration testing tools introduction
FastAPI Quick Start
FastAPI Quick Start
C# WPF下限制TextBox只输入数字、小数点、删除等键
misc-file steganography of CTF
MySQL - Function and Constraint Commands
Flink PostgreSQL CDC configuration and FAQ
C#预定义数据类型简介
Operators and Interaction Basics
ClickHouse查询语句详解
2022CISCNmisc