一、安装
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0.x86_64.rpm
yum -y localinstall influxdb-1.8.0.x86_64.rpm
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
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
网友评论