I installed influxdb on my CentOS 8 by a script provided for there: RedHat & CentOS.
after I installed it, I don't know which is its config file.this is the result of my search.
[root@dele ~]# find / -name influx*/etc/systemd/system/multi-user.target.wants/influxdb.service/etc/systemd/system/influxd.service/etc/logrotate.d/influxdb/etc/default/influxdb/root/.influxdbv2/influxd.bolt/var/lib/influxdb/var/log/influxdb/usr/bin/influx/usr/bin/influxd/usr/lib/systemd/system/influxdb.service/usr/lib/influxdb/usr/lib/influxdb/scripts/influxdb.service/opt/src/influxdb-2.0.2.x86_64.rpm
I guess it be /etc/default/influxdb
, but I cat
it get nothing but a empty file.
Best Answer
There is a big change from v1 to v2 in InfluxDB,
in InfluxDB v1, the influxdb has configure file indeed, which locate there by default:
/etc/influxdb/influxdb.conf
but from v2, there have changed the config way. you can confirm it in there.
When influxd starts, it checks for a file named config.* in the current working directory. The file extension depends on the syntax of the configuration file.
To customize the directory path of the configuration file, set the INFLUXD_CONFIG_PATH environment variable to your custom path.
On startup, influxd will check for a config.* in the INFLUXD_CONFIG_PATH directory.
So, in v2, the config file is vary by your start influxd place. If you want to have a special path, you should set INFLUXD_CONFIG_PATH
.