• 基于Windows Ubuntu子系统安装 TDengine


    1、下载安装包

    1. cd /home/summergao
    2. 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、安装

    1. cd TDengine-server-3.0.1.5
    2. sudo ./install.sh
    安装说明:

    install.sh 安装脚本在执行过程中,会通过命令行交互界面询问一些配置信息。如果希望采取无交互安装方式,那么可以运行 ./install.sh -e no 。运行 ./install.sh -h 指令可以查看所有参数的详细说明信息。

    注意事项:

    当安装第一个节点时,出现 Enter FQDN: 提示的时候,不需要输入任何内容。只有当安装第二个或以后更多的节点时,才需要输入已有集群中任何一个可用节点的 FQDN,支持该新节点加入集群。当然也可以不输入,而是在新节点启动前,配置到新节点的配置文件中。

    up-4b964a57cf805b4942bad5311e02c1fe9b7.png

    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

    up-c91e774104da6be06d906f87570d7d2101e.png

    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

    up-4b61d7e9b182af64ba083274434dd9f974b.png

    6、进入TDengine 命令行(CLI)

    taos

    up-08c2df5865e15a147cdc8ef9eb6cd50e8a5.png

    7、示例

    在 TDengine CLI 中,用户可以通过 SQL 命令来创建/删除数据库、表等,并进行数据库(Database)插入查询操作。在终端中运行的 SQL 语句需要以分号(;)结束来运行。示例:

    1. CREATE DATABASE demo;
    2. USE demo;
    3. CREATE TABLE t (ts TIMESTAMP, speed INT);
    4. INSERT INTO t VALUES ('2019-07-15 00:00:00', 10);
    5. INSERT INTO t VALUES ('2019-07-15 01:00:00', 20);
    6. SELECT * FROM t;

    up-21a2ee9041e2e76971e77f462f9ea6db864.png

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

    参考

    https://docs.taosdata.com/get-started/package/#!

  • 相关阅读:
    基数排序详解
    Clickhouse 单机版 及 Clickhouse 集群的安装及搭建
    自己公司开发的ERP系统,怎么对接京东,淘宝等这些电商平台?
    美亚杯长安杯总结,特别感谢浙警许专家,22年取证辉煌缔造者,努力学习,学习!
    算法分析与设计 | 递归(数的计数)
    《Python3 网络爬虫开发实战》:方便好用的 requests(1)
    2022年中国儿童食品市场规模与发展趋势
    联想拯救者电脑数据恢复方法,适用于未备份者
    [Python数据可视化] Plotly:交互式数据可视化的强大工具
    JAVA设计模式详解(独家AI解析)
  • 原文地址:https://blog.csdn.net/qq_25231683/article/details/127445023