1、下载安装包
- cd /home/summergao
-
- sudo wget https://www.taosdata.com/assets-download/3.0/TDengine-server-3.0.1.5-Linux-x64.tar.gz
2、下载完成后解压缩包
tar -zxvf TDengine-server-3.0.1.5-Linux-x64.tar.gz
3、安装
- cd TDengine-server-3.0.1.5
- sudo ./install.sh
安装说明:install.sh 安装脚本在执行过程中,会通过命令行交互界面询问一些配置信息。如果希望采取无交互安装方式,那么可以运行
./install.sh -e no。运行./install.sh -h指令可以查看所有参数的详细说明信息。
注意事项:
当安装第一个节点时,出现
Enter FQDN:提示的时候,不需要输入任何内容。只有当安装第二个或以后更多的节点时,才需要输入已有集群中任何一个可用节点的 FQDN,支持该新节点加入集群。当然也可以不输入,而是在新节点启动前,配置到新节点的配置文件中。

summergao@LAPTOP-CHOA4ICV:~/TDengine-server-3.0.1.5$ sudo ./install.sh
Start to install TDengine...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
Couldn't find an alternative telinit implementation to spawn.
System hostname is: LAPTOP-CHOA4ICV
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:
To configure TDengine : edit /etc/taos/taos.cfg
To configure Taos Adapter : edit /etc/taos/taosadapter.toml
To start TDengine : sudo service taosd start
To access TDengine : taos -h LAPTOP-CHOA4ICV to login into TDengine server
TDengine is installed successfully!
4、 启动 TDengine 的服务进程
sudo service taosd start

summergao@LAPTOP-CHOA4ICV:~/TDengine-server-3.0.1.5$ sudo service taosd start
* Starting TDengine...... [ OK ]
summergao@LAPTOP-CHOA4ICV:~/TDengine-server-3.0.1.5$ 10/21 09:09:16.915691 00000372 TAOS_ADAPTER info "start server:00000372" model=main
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /debug/pprof/ --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/cmdline --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/profile --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] POST /debug/pprof/symbol --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/symbol --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/trace --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/allocs --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/block --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/goroutine --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/heap --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/mutex --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /debug/pprof/threadcreate --> github.com/gin-contrib/pprof.pprofHandler.func1 (3 handlers)
[GIN-debug] GET /metrics --> github.com/gin-gonic/gin.WrapH.func1 (5 handlers)
[GIN-debug] GET /-/ping --> github.com/taosdata/taosadapter/v3/controller/ping.Controller.Init.func1 (5 handlers)
[GIN-debug] POST /rest/sql --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).sql-fm (7 handlers)
[GIN-debug] POST /rest/sql/:db --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).sql-fm (7 handlers)
[GIN-debug] GET /rest/login/:user/:password --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).des-fm (6 handlers)
[GIN-debug] GET /rest/ws --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).ws-fm (6 handlers)
[GIN-debug] GET /rest/stmt --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).stmt-fm (6 handlers)
[GIN-debug] GET /rest/tmq --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).tmq-fm (6 handlers)
[GIN-debug] POST /rest/upload --> github.com/taosdata/taosadapter/v3/controller/rest.(*Restful).upload-fm (7 handlers)
[GIN-debug] GET /genauth/:user/:password/:key --> github.com/taosdata/taosadapter/v3/plugin.RegisterGenerateAuth.func1 (5 handlers)
10/21 09:09:16.916088 00000372 TAOS_ADAPTER info "init plugin prometheus/v1" model=plugin
[GIN-debug] POST /prometheus/v1/remote_read/:db --> github.com/taosdata/taosadapter/v3/plugin/prometheus.(*Plugin).Read-fm (7 handlers)
[GIN-debug] POST /prometheus/v1/remote_write/:db --> github.com/taosdata/taosadapter/v3/plugin/prometheus.(*Plugin).Write-fm (7 handlers)
10/21 09:09:16.916244 00000372 TAOS_ADAPTER info "init plugin statsd/v1" model=plugin
10/21 09:09:16.917169 00000372 TAOS_ADAPTER info "init plugin collectd/v1" model=plugin
10/21 09:09:16.917603 00000372 TAOS_ADAPTER info "collectd disabled" model=collectd
10/21 09:09:16.917620 00000372 TAOS_ADAPTER info "init plugin influxdb/v1" model=plugin
[GIN-debug] POST /influxdb/v1/write --> github.com/taosdata/taosadapter/v3/plugin/influxdb.(*Influxdb).write-fm (7 handlers)
10/21 09:09:16.917712 00000372 TAOS_ADAPTER info "init plugin node_exporter/v1" model=plugin
10/21 09:09:16.918689 00000372 TAOS_ADAPTER info "node_exporter disabled" model=NodeExporter
10/21 09:09:16.918708 00000372 TAOS_ADAPTER info "init plugin opentsdb/v1" model=plugin
[GIN-debug] POST /opentsdb/v1/put/json/:db --> github.com/taosdata/taosadapter/v3/plugin/opentsdb.(*Plugin).insertJson-fm (7 handlers)
[GIN-debug] POST /opentsdb/v1/put/telnet/:db --> github.com/taosdata/taosadapter/v3/plugin/opentsdb.(*Plugin).insertTelnet-fm (7 handlers)
10/21 09:09:16.918800 00000372 TAOS_ADAPTER info "init plugin opentsdb_telnet/v1" model=plugin
10/21 09:09:16.919419 00000372 TAOS_ADAPTER info "opentsdb_telnet disabled" model=opentsdb_telnet
10/21 09:09:16.919437 00000372 TAOS_ADAPTER info "all plugin init finish" model=plugin
10/21 09:09:16.919817 00000372 TAOS_ADAPTER info "UDP listening on "[::]:6044"" model=statsd
10/21 09:09:16.919888 00000372 TAOS_ADAPTER info "Started the statsd service on ":6044"" model=statsd
10/21 09:09:16.919906 00000372 TAOS_ADAPTER info "all plugin start finish" model=plugin
10/21 09:09:16.920617 00000372 TAOS_ADAPTER info " server on : 6041 " model=main
5、 检查服务是否正常工作
sudo service taosd status

6、进入TDengine 命令行(CLI)
taos

7、示例
在 TDengine CLI 中,用户可以通过 SQL 命令来创建/删除数据库、表等,并进行数据库(Database)插入查询操作。在终端中运行的 SQL 语句需要以分号(;)结束来运行。示例:
- CREATE DATABASE demo;
- USE demo;
- CREATE TABLE t (ts TIMESTAMP, speed INT);
- INSERT INTO t VALUES ('2019-07-15 00:00:00', 10);
- INSERT INTO t VALUES ('2019-07-15 01:00:00', 20);
- SELECT * FROM t;

除执行 SQL 语句外,系统管理员还可以从 TDengine CLI 进行检查系统运行状态、添加删除用户账号等操作。TDengine CLI 连同应用驱动也可以独立安装在机器上运行,更多细节请参考 TDengine 命令行 。