Centos 安装 Influxdb + Chronograf

安装 Influxdb 

1:下载安装包

官网下载地址 https://portal.influxdata.com/downloads/
# wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0.x86_64.rpm
# sudo yum localinstall influxdb-1.8.0.x86_64.rpm

2:本地安装
# mkdir /usr/local/influxdb
# mv influxdb-1.8.0.x86_64.rpm /usr/local/influxdb
# yum localinstall influxdb-1.8.0.x86_64.rpm

3: 初始化和启动创建DB保存目录
# mkdir /data/influxdb -p
# chown influxdb:influxdb /data/influxdb

4: 备份修改配置文件
# cp /etc/influxdb/influxdb.conf /etc/influxdb/influxdb.conf-bak
# vi /etc/influxdb/influxdb.conf


修改下面的数据库位置
[meta]
dir = "/data/influxdb/meta"
[data]
dir = "/data/influxdb/data"
wal-dir = "/data/influxdb/wal"

5: 启动服务
# systemctl start influxd

[root@localhost influxdb]# ps -aux | grep influxdb
influxdb 17354 1.3 0.6 340272 25916 ? Ssl 16:58 0:00 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
root 17362 0.0 0.0 112812 972 pts/0 R+ 16:58 0:00 grep --color=auto influxdb

6: 其他
/usr/bin下
influx influxdb命令行
influxd influxdb服务
influx_inspect 查看工具
influx_stress 压力测试工具
influx_tsm 数据库转换工具

默认 /var/lib/influxdb/
data 数据
meta 数据库元数据
wal 预写日志文件

/var/log/influxdb下
influxd.log 日志文件

/etc/influxdb下
influxdb.conf 配置文件

/var/run/influxdb/
influxd.pid PID文件

创建用户权限
$ influx

CREATE USER usera WITH PASSWORD 'passwd' WITH ALL PRIVILEGES

用户名密码访问
$ influx -username usera  -password passwd

$ sudo vi /etc/influxdb/influxdb.conf

[http]

enabled = true

bind-address = ":8086"

auth-enable=true,

$ systemctl restart influxdb

# 创建数据库
> create database testdb

> show databases
name: databases
name
----
_internal
testdb
>

安装 Chronograf

1:下载安装包
wget https://dl.influxdata.com/chronograf/releases/chronograf-1.8.4.x86_64.rpm
2:本地安装
$ sudo yum localinstall chronograf-1.8.4.x86_64.rpm
3: 启动
$ sudo systemctl start chronograf
web access url:http://ip:8888

 

posted @ 2020-07-05 17:15  tamatama  阅读(1559)  评论(0编辑  收藏  举报
GO TOP