一、前文
二、下载安装
- 先下载安装包放到服务器上
- 下载地址:使用安装包立即开始 | TDengine 文档 | 涛思数据
- 再rpm安装,
sudo rpm -ivh TDengine-server-<version>-Linux-x64.rpm
- 安装的时候,会跳出两个提示
Enter FQDN:port
,第一次安装,这个地方一定要直接回车跳过!Enter your email address
,这个随意。
sudo rpm -ivh TDengine-server-3.0.0.1-Linux-x64.rpm
sudo rpm -ivh taosTools-2.1.2-Linux-x64.rpm
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# sudo rpm -ivh TDengine-server-3.0.0.1-Linux-x64.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:tdengine-3.0.0.1-3 ################################# [100%]
Start to install TDengine...
System hostname is: iZ2ze30dygwd6yh7gu6lskZ
Enter FQDN:port (like h1.taosdata.com:6030) of an existing TDengine cluster node to join
OR leave it blank to build one:
Enter your email address for priority support or enter empty to skip:
Created symlink /etc/systemd/system/multi-user.target.wants/taosd.service → /etc/systemd/system/taosd.service.
To configure TDengine : edit /etc/taos/taos.cfg
To start TDengine : sudo systemctl start taosd
To access TDengine : taos -h iZ2ze30dygwd6yh7gu6lskZ to login into TDengine server
TDengine is installed successfully!
三、启动taosd
- systemctl start taosd
- systemctl stop taosd
- systemctl restart taosd
四、查看状态
- systemctl status taosd
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# systemctl status taosd
● taosd.service - TDengine server service
Loaded: loaded (/etc/systemd/system/taosd.service; enabled; vendor preset: disabled)
Active: inactive (dead)
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# systemctl start taosd
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# systemctl status taosd
● taosd.service - TDengine server service
Loaded: loaded (/etc/systemd/system/taosd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-09-07 09:45:11 CST; 4s ago
Process: 14004 ExecStartPre=/usr/local/taos/bin/startPre.sh (code=exited, status=0/SUCCESS)
Main PID: 14010 (taosd)
Tasks: 21 (limit: 26213)
Memory: 6.9M
CGroup: /system.slice/taosd.service
├─14010 /usr/bin/taosd
└─14017 /usr/bin/udfd -c /etc/taos
Sep 07 09:45:11 iZ2ze30dygwd6yh7gu6lskZ systemd[1]: Starting TDengine server service...
Sep 07 09:45:11 iZ2ze30dygwd6yh7gu6lskZ systemd[1]: Started TDengine server service.
五、命令行(CLI)
taos
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# taos
Welcome to the TDengine Command Line Interface, Client Version:3.0.0.1
Copyright (c) 2022 by TDengine, all rights reserved.
Server is Community Edition.
taos> exit
六、修改root密码
- 刚安装好的TDengine是没有密码的,直接
taos
就能进入命令行(CLI) - 然后修改root账户的密码,
alter user root pass '123456';
- 具体查看:TDengine 入门教程④——权限管理 | 用户增删改查,授权与撤销授权
[root@VM-0-3-centos ~]# taos
Welcome to the TDengine Command Line Interface, Client Version:3.0.2.0
Copyright (c) 2022 by TDengine, all rights reserved.
****************************** Tab Completion **********************************
* The TDengine CLI supports tab completion for a variety of items, *
* including database names, table names, function names and keywords. *
* The full list of shortcut keys is as follows: *
* [ TAB ] ...... complete the current word *
* ...... if used on a blank line, display all valid commands *
* [ Ctrl + A ] ...... move cursor to the st[A]rt of the line *
* [ Ctrl + E ] ...... move cursor to the [E]nd of the line *
* [ Ctrl + W ] ...... move cursor to the middle of the line *
* [ Ctrl + L ] ...... clear the entire screen *
* [ Ctrl + K ] ...... clear the screen after the cursor *
* [ Ctrl + U ] ...... clear the screen before the cursor *
**********************************************************************************
Server is Community Edition.
taos> show users;
name | super | enable | sysinfo | create_time |
================================================================================
root | 1 | 1 | 1 | 2022-12-14 17:09:19.213 |
Query OK, 1 row(s) in set (0.001346s)
taos> alter user root pass '123456';
Query OK, 0 row(s) affected (0.001140s)
taos> exit
- 修改root密码后,taos就不能直接进入命令行(CLI)了
- 必须 taos -p,然后输入密码
[root@VM-0-3-centos ~]# taos
Welcome to the TDengine Command Line Interface, Client Version:3.0.2.0
Copyright (c) 2022 by TDengine, all rights reserved.
failed to connect to server, reason: Authentication failure
七、问题解决
安装期间遇到一个问题,折腾了一个上午。
详情请查阅:TDengine 入门教程 问题篇①——failed to connect to server, reason: Unable to establish connection
觉得好,就一键三连呗(点赞+收藏+关注)