influxdb2安装
Posted xiangjai
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了influxdb2安装相关的知识,希望对你有一定的参考价值。
目录
3. 配置influxdb2 (目录/etc/influxdb)
1. 下载influxdb2
Index of /influxdata/yum/el7-x86_64/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
csdn下载地址: influxdb2-2.1.1.x86_64安装包rpm
2. 安装influxdb2
rpm -ivh influxdb2-2.1.1.x86_64.rpm
安装完成
warning: influxdb2-2.1.1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2582e0c5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:influxdb2-0:2.1.1-1 ################################# [100%]
Created symlink from /etc/systemd/system/influxd.service to /usr/lib/systemd/system/influxdb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/influxdb.service to /usr/lib/systemd/system/influxdb.service.
3. 配置influxdb2 (目录/etc/influxdb)
[root@ influxdb]# vi config.toml
bolt-path = "/var/lib/influxdb/influxd.bolt"
engine-path = "/var/lib/influxdb/engine"
#web管理界面,1.1版本以上默认关闭。需要的话,可以手动打开
enable=true
#web服务界面的端口
bind-address=":8086"
4. 启动influxdb2
[root@ influxdb]# systemctl start influxdb
[root@ influxdb]# systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2022-03-24 18:49:14 CST; 5s ago
Docs: https://docs.influxdata.com/influxdb/
Process: 6978 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh (code=exited, status=0/SUCCESS)
Main PID: 6979 (influxd)
CGroup: /system.slice/influxdb.service
└─6979 /usr/bin/influxd
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.869069Z lvl=info msg="Compaction setti...1648
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.869093Z lvl=info msg="Open store (star...tart
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.869188Z lvl=info msg="Open store (end)...97ms
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.869236Z lvl=info msg="Starting retenti...=30m
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.869262Z lvl=info msg="Starting precrea...=30m
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.869454Z lvl=info msg="Starting query c...1024
Mar 24 18:49:13 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:13.872649Z lvl=info msg="Configuring Infl...ts=0
Mar 24 18:49:14 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:14.176032Z lvl=info msg=Starting log_id=0...l=8h
Mar 24 18:49:14 KH-PRBT influxd-systemd-start.sh[6978]: ts=2022-03-24T10:49:14.176113Z lvl=info msg=Listening log_id=...8086
Mar 24 18:49:14 KH-PRBT systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Hint: Some lines were ellipsized, use -l to show in full.
5 web访问influxdb2
启动界面 配置账号/org/token信息
访问http://ip:8086
6. influxdb client下载
Index of /influxdata/yum/el7-x86_64/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
7. influxdb client安装
rpm -ivh influxdb2-client-2.2.1.x86_64.rpm
安装完成
warning: influxdb2-client-2.2.1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2582e0c5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:influxdb2-cli-0:2.2.1-1 ################################# [100%]
8. influxdb client配置
influx config create --config-name marster-conf \\
--host-url http://localhost:8086 \\
--org <org> \\
--token <token> \\
--active
9. influxdb client进行相关操作
ping Check the InfluxDB /health endpoint
setup Setup instance with initial user, org, bucket
write Write points to InfluxDB
bucket Bucket management commands
completion Generates completion scripts
bucket-schema Bucket schema management commands
query Execute a Flux query
config Config management commands
org, organization Organization management commands
delete Delete points from InfluxDB
user User management commands
task Task management commands
backup Backup database
restore Restores a backup directory to InfluxDB
telegrafs List Telegraf configuration(s). Subcommands manage Telegraf configurations.
dashboards List Dashboard(s).
export Export existing resources as a template
secret Secret management commands
v1 InfluxDB v1 management commands
auth, authorization Authorization management commands
apply Apply a template to manage resources
stacks List stack(s) and associated templates. Subcommands ma
如备份/回复等操作
influx backup 路径
influx restore 路径
以上是关于influxdb2安装的主要内容,如果未能解决你的问题,请参考以下文章