Centos7 安装 TDengine
1、简介
官网: https://www.taosdata.com
TDengine 是一款开源、高性能、云原生的时序数据库(Time Series Database, TSDB), 它专为物联网、车联网、工业互联网、金融、IT 运维等场景优化设计。同时它还带有内建的缓存、流式计算、数据订阅等系统功能,能大幅减少系统设计的复杂度,降低研发和运营成本,是一款极简的时序数据处理平台。
2、安装
- 在linux系统中,运行环境最低要求如下:
软件 | 版本 |
---|---|
linux 内核版本 | 3.10.0-1160.83.1.el7.x86_64 |
glibc 版本 | 2.17 |
- 新增hostname,文件中新增 taos1
vi /etc/hostname
- 创建安装目录
mkdir -p /usr/local/tdengine/
- 下载安装包,并把安装包上传到/usr/local/tdengine/
- 解压文件夹
tar -zxvf TDengine-server-3.0.7.0-Linux-x64.tar.gz
- 进入解压文件
cd TDengine-server-3.0.7.0
- 执行安装命令
./install.sh
- 修改taos.cfg配置文件,如图 ip改为服务器ip/hostname(重点)
vi /etc/taos/taos.cfg
- 配置hosts (添加:前面是td部署服务器ip,后面是td部署服务器hostname值)
vi /etc/hosts
- 使配置生效
/etc/init.d/network restart
3、启动
安装后,请使用 systemctl 命令来启动 TDengine 的服务进程。
systemctl start taosd
systemctl start taosadapter
可以使用 systemctl 来单独管理上面的每一个服务
systemctl start taosd
systemctl stop taosd
systemctl restart taosd
systemctl status taosd
4、异常
4.1 Mnode not found 异常
输入taos,出现 Mnode not found 异常,如下
[root@localhost TDengine-server-3.0.7.0]# taos
Welcome to the TDengine Command Line Interface, Client Version:3.0.7.0
Copyright (c) 2022 by TDengine, all rights reserved.
failed to connect to server, reason: Mnode not found
卸载
#卸载命令(tar包解压方式安装的):
rmtaos
#卸载后删除配置文件
rm -rf /var/log/taos
rm -rf /etc/taos
rm -rf /var/lib/taos/
重新解压安装
tar -zxvf TDengine-server-<version>-Linux-x64.tar.gz
sudo ./install.sh
4.2 Client and server’s time is not synchronized 异常
yum -y install ntp ntpdate
ntpdate cn.pool.ntp.org
5、客户端连接
DBeaver 下载