安装Influxdb

  1. cd /share
  2. wget https://dl.influxdata.com/influxdb/releases/influxdb-1.5.3.x86_64.rpm
  3. sudo su
  4. yum localinstall influxdb-1.5.3.x86_64.rpm

启动Influxdb

  1. systemctl start influxdb
  2. systemctl stop influxdb
  3. systemctl enable influxdb
  4. systemctl status influxdb

用户管理

  1. -- 查看当前用户有哪些
  2. show users;
  3. -- 创建用户
  4. create user "root" with password '123456';
  5. -- 设置密码
  6. SET PASSWORD FOR root ='123456';
  7. -- 创建管理员权限的用户
  8. create user "root" with password '123456' with all privileges;
  9. -- 删除用户
  10. drop user "root";

验证

  1. -- 启动Influxdb
  2. influx
  3. show databases;
  4. use jmxDB;
  5. -- 类似MySQL中的show tables;
  6. show measurements;
  7. select * from jvmMemory limit 5;
  8. -- 查看表字段
  9. show field keys;
  10. -- 查看JMX监控指标
  11. show series from jvmMemory;