influxdb 安装配置详解

1:简介


InfluxDB 是一个开源分布式时序、事件和指标数据库。使用 Go 语言编写,无需外部依赖。其设计目标是实现分布式和水平伸缩扩展。


1、它有三大特性:

1. Time Series (时间序列):你可以使用与时间有关的相关函数(如最大,最小,求和等)

2. Metrics(度量):你可以实时对大量数据进行计算

3. Eevents(事件):它支持任意的事件数据


2、特点

schemaless(无结构),可以是任意数量的列

Scalable

min, max, sum, count, mean, median 一系列函数,方便统计

Native HTTP API, 内置http支持,使用http读写

Powerful Query Language 类似sql

Built-in Explorer 自带管理工具


3、API


InfluxDB 支持两种api方式

HTTP API

Protobuf API


2:安装部署


添加yum 源


cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo

[influxdb]

name = InfluxDB Repository - RHEL \$releasever

baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable

enabled = 1

gpgcheck = 1

gpgkey = https://repos.influxdata.com/influxdb.key

EOF


3:安装

 yum install influxdb -y


4:启动服务、添加开机启动

 service influxdb start

systemctl enable  influxdb 

service influxdb status





5:服务默认使用端口:

Networking By default, InfluxDB uses the following network ports:

TCP port 8083 is used for InfluxDB’s Admin panel

TCP port 8086 is used for client-server communication over InfluxDB’s HTTP API

TCP ports 8088 and 8091 are required for clustered InfluxDB instances



6:服务验证

输入

influx 

进入数据库

[root@ctn-7-12 ~]# influx

Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.

Connected to http://localhost:8086 version 0.11.0

InfluxDB shell 0.11.0




1、创建一个查询用户

CREATE USER "ptquery" WITH PASSWORD 'ptquery'


2、查看用户:

> show users;

user    admin

ptquery false

ptdb1   fals


3、也可以在页面创建查询用户

CREATE USER "ptquery" WITH PASSWORD 'ptquery'


4、查看服务端口

[root@ctn-7-12 ~]# netstat -tunlp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    

        

tcp6       0      0 :::8083                 :::*                    LISTEN      22124/influxd       

tcp6       0      0 :::8086                 :::*                    LISTEN      22124/influxd       


4、浏览器访问数据库管理平台:

http://172.16.7.11:8083/


参考信息:

https://influxdata.com/downloads/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值