InfluxDB安裝配置Win64
前言
本文來自:https://blog.csdn.net/xiaocxyczh/article/details/78682211
工業(yè)監(jiān)控系統(tǒng)的數(shù)據(jù)采集量非常大,使用mysql數(shù)據(jù)庫進行數(shù)據(jù)存儲和查詢時很慢,網(wǎng)上有人做過mysql和時序數(shù)據(jù)庫influxDB對比,存儲1000萬條數(shù)據(jù)mysql要7分多鐘,influxDB只需2分多鐘,從1000萬條數(shù)據(jù)讀10000條所需數(shù)據(jù)mysql要6秒多,influxDB只需0.22秒多,windows版influxDB安裝與配置流程如下:
下載安裝
下載鏈接https://portal.influxdata.com/downloads/,選windows版
解壓
修改配置
-
influxdb.conf
// InfluxDB 安裝后,修改配置文件influxdb.conf // (1)端口 // (2)[http] auth-enabled = true // 開啟 author // (3)[http] flux-enabled = true // (4)[http] log-enabled = false // 關閉http的日志 // 創(chuàng)建用戶 create user "iepms" with password 'iepms@576576' with all privileges // 創(chuàng)建數(shù)據(jù)庫 CREATE DATABASE "IEPMS_CACHE" WITH DURATION 2d REPLICATION 1 SHARD DURATION 1h NAME "cache_policy_2d" // 統(tǒng)計 // 查詢某設備最近一條緩存記錄 select * from DevStateMsg order by time desc;
啟動
-
雙擊 influxd.exe
使配置生效并打開數(shù)據(jù)庫連接,雙擊influxd.exe就好,然后雙擊influx.exe進行操作,網(wǎng)上有操作教程,注意操作數(shù)據(jù)庫時不能關閉influxd.exe,我不知道為什么總有這么個提示:There was an error writing history file: open : The system cannot find the file specified.不過好像沒啥影響
web管理器
要使用web管理需要下載Chronograf,https://portal.influxdata.com/downloads第三個就是,下載完直接解壓,雙擊exe程序,在瀏覽器輸入http://localhost:8888/,一開始登錄要賬戶密碼,我都用admin就進去了
這個是查看建立的數(shù)據(jù)庫