二十三:influxdb v1.7(Centos7.2)安装使用

一:influxdata安装:

官网地址为:https://www.influxdata.com
下载地址:https://portal.influxdata.com/downloads/

1.1 安装:

官网为:https://docs.influxdata.com/influxdb/v1.7/introduction/installation/

**配置yum文件:**

cat <

安装:yum install influxdb
配置文件:/etc/influxdb/influxdb.conf
启动: systemctl start influxdb

二:开始使用:

https://docs.influxdata.com/influxdb/v1.7/introduction/getting-started/

进入数据库:

Connected to http://localhost:8086 version 1.7.4
InfluxDB shell version: 1.7.4
Enter an InfluxQL query

show databases;
name: databases
name


_internal

**创建个数据库:

CREATE DATABASE kunming;
show databases;
name: databases
name


_internal
kunming

增加条记录:

show measurements;

INSERT cpu,host=serverA,region=us_west value=0.64
show measurements;
name: measurements
name


cpu

INSERT cell,cellid=1,region=kunming,siteid=5 value=64
show measurements;
name: measurements
name


cell
cpu

SELECT * FORM cell
ERR: error parsing query: found FORM, expected FROM at line 1, char 10
SELECT * from “cell”
name: cell
time cellid region siteid value


2019-03-03T15:22:01.509799179Z 1 kunming 5 64

删除掉记录:

https://docs.influxdata.com/influxdb/v1.7/query_language/database_management/

SELECT * from “cell”
name: cell
time cellid region siteid value


2019-03-03T15:22:01.509799179Z 1 kunming 5 64

DELET * FROM “cell”
ERR: error parsing query: found DELET, expected SELECT, DELETE, SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1
DELETE * FROM “cell”
ERR: error parsing query: found *, expected FROM, WHERE at line 1, char 8
DELETE FROM “cell”
show measurements;
name: measurements
name


cpu

你可能感兴趣的:(二十三:influxdb v1.7(Centos7.2)安装使用)