Centos 7.9 InfuxDB安装

编程入门 行业动态 更新时间:2024-10-11 01:16:48

<a href=https://www.elefans.com/category/jswz/34/1769841.html style=Centos 7.9 InfuxDB安装"/>

Centos 7.9 InfuxDB安装

一.安装InfuxDB
1.配置 InfluxDB 的 yum 源:

cat <<EOF |  tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL /$releasever
baseurl = //$releasever//$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = .key
EOF

2.yum 安装influxdb

[root@njmon ~]# yum install -y influxdb
[root@njmon ~]# systemctl start influxdb
[root@njmon ~]# systemctl enable influxdb

3.创建 njmon 库

[root@njmon ~]# influx
Connected to http://localhost:8086 version 1.8.10
InfluxDB shell version: 1.8.10
> create database njmon
> show databases;
name: databases
name
----
_internal
njmon
> exit

4.启用用户认证
添加用户,设置权限。

[root@njmon ~]# influx
Connected to http://localhost:8086 version 1.8.10
InfluxDB shell version: 1.8.10
> show users;
user admin
---- -----
> create user "admin" with password 'wwwwww' with all privileges;
> show users;
user  admin
----  -----
admin true

5.InfluxDB 默认是禁用认证策略的。
编辑配置文件,把 [http] 下的 auth-enabled 选项设置为 true

auth-enabled = true

6.重启服务,配置生效

[root@njmon ~]# systemctl restart influxdb.service

版权声明:本文为博主原创文章,未经博主允许不得转载。

LINUX

更多推荐

Centos 7.9 InfuxDB安装

本文发布于:2024-02-26 03:25:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1701208.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Centos   InfuxDB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!