1、安裝TDengine:
一、從官網https://www.taosdata.com/cn/getting-started/下載RPM包(tdengine-1.6.2.0-3.el7.x86_64.rpm)
二、安裝:rpm -ivh tdengine-1.6.2.0-3.el7.x86_64.rpm
三、啓動taos:systemctl start taosd
四、輸入taos,進入數據庫
五、建立數據庫 create database udb;node
2、安裝Telegraf:c++
一、下載安裝golang
wget https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1-1.x86_64.rpm sudo yum localinstall telegraf-1.12.1-1.x86_64.rpm
二、配置Telegraf,進入/etc/telegraf/telegraf.conf數據庫
在文件最後添加,注意url中的udb爲上面建立的db.npm
[[outputs.http]] url = "http://localhost:6020/telegraf/udb" method = "POST" username = "root" password = "taosdata" data_format = "json" json_timestamp_units = "1ms"
三、啓動 sudo systemctl start telegrafjson
3、安裝nodebash
1.yum install -y gcc-c++ make
2. curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
3.sudo yum install nodejs
4.檢查是否安裝成功curl
node --version
npm --versionui
export GOROOT=/usr/lib/golang export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin