下载安装
[root@hadoop01 software]# wget https://dl.influxdata.com/influxdb/releases/influxdb-1.6.3.x86_64.rpm
[root@hadoop01 software]# yum localinstall influxdb-1.6.3.x86_64.rpm
修改配置文件
[root@hadoop01 data]# vi /etc/influxdb/influxdb.conf
dir = "/data/influxdb/meta"
dir = "/data/influxdb/data"
wal-dir = "/data/influxdb/wal"
[http]
bind-address = ":8086"
注意:如果influxdb安装在hadoop主机上,因为8088的端口是yarn的默认端口,influxdb主服务的端口也是8088。为避免两者冲突,把其中一个端口号修改一下。这里我把我的influxdb端口号改成8089:bind-address = "192.168.1.8:8089"。
修改文件夹属主
[root@hadoop01 data]# mkdir /data/influxdb
[root@hadoop01 data]# chown influxdb:influxdb /data/influxdb/
启动influxdb
[root@hadoop01 ~]# systemctl start influxdb
连接influxdb
[root@hadoop01 ~]# influx
Connected to http://localhost:8086 version 1.6.3
InfluxDB shell version: 1.6.3
> show databases
name: databases
name
----
_internal
> quit
[root@hadoop01 ~]#
此种方式安装的influxdb默认设置了开机自启动,不需要再额外配置了。
注意:InfluxDB安装过程中如果有卸载重装过,必须重启主机,要不然influxdb服务起不来。