【influxDB】CentOS 7.x InfluxDB 1.8.0的安装使用

发布时间 2023-11-29 18:14:23作者: GaoYanbing

一、安装

wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0.x86_64.rpm
yum -y localinstall influxdb-1.8.0.x86_64.rpm

 
image.png

systemctl start influxdb
systemctl enable influxdb
systemctl status influxdb

ss -tan | grep 8086


 
image.png

二、操作

influx -host 'localhost' -port '8086'

CREATE DATABASE "testDb";
show databases;

创建数据库数据保留时长策略:3w=3周 3d=day 3h=3小时
USE testDb;
create retention policy "rp_3d" on "testDb" duration 3d replication 1 default;
show retention policies on "testDb";

create user "testUser" with password 'TestPasswd' with all privileges;
grant all privileges on testDb to testUser;
show grants for testUser;

添加一个只读权限用户
create user "testUser" with password 'TestPasswd';
grant read on "testDb" to "testUser";

删除用户
drop user "username"

开启数据库认证
vim /etc/influxdb/influxdb.conf

 
image.png

 

systemctl restart influxdb

测试认证登录
influx -host 'localhost' -port '8086' -usernmae 'testUser' -password 'testPasswd'

三、参考

在CentOS 7.7 x86_64上安装InfluxDB 1.8.0实录
https://blog.csdn.net/tao_627/article/details/105905770

influxDB1.1.0和1.8.0版本安装并开启web界面
https://blog.csdn.net/wsdc0521/article/details/106064914

InfluxDB概念和基本操作
https://www.cnblogs.com/wzbk/p/10569683.html

InfluxDB系列教程
https://blog.csdn.net/waitig1992/article/details/74527144

InfluxDB学习之InfluxDB的基本概念
https://blog.csdn.net/waitig1992/article/details/60766662



作者:Bogon
链接:https://www.jianshu.com/p/2ce25c7f1d31
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。