-
Notifications
You must be signed in to change notification settings - Fork 4
InfluxDB
At the time of writing this, for the ARM architecture, there wasn't an RPM we could use. So, as they say "we had to wing it" with tarballs. You'll most likely need to run a lot of these commands as root. I may have forgot something.
Grab the nightly tarball from here (In the InfluxDB Time Series Data Storage box, select nightly and then at the bottom is an ARM link):
https://portal.influxdata.com/downloads
wget https://dl.influxdata.com...
cp ~./influxdb-nightly... /tmp
cd /tmp
gunzip influxdb-nightly...
tar -xvf influxdb-nightly...
We did a little bit of trickery here.
cd influxdb-nightly...
tar -cvf nightly-build.tar etc usr var //Tars up all of the folders in the folder
cp nightly-build.tar / //Copies tarball to root folder
tar -xvf nightly-build.tar
Final command untars the nightly build folder and deposits folders into the appropriate places.
To start the database all you'll need to do is type "influxd" into the command line, open up a NEW terminal window and then type influx and you'll be able to access the database (You'll have to have 2 terminals open to run it like this).
influxd //Runs in a terminal Ctrl + c to kill the process
influx //Allows access to a database shell
To run the service in the background:
cp /usr/lib/influxdb/scripts/influxdb.service /etc/systemd/system/influxdb.service
systemctl reload-daemon
systemctl enable influxdb.service
systemctl start influxdb.service
systemctl status influxdb.service
Now, you should be able to run influx and you should be able to access the database.
influx //Allows access to a database shell
Solved with:
https://github.com/influxdata/influxdb/issues/4824
One of my problems was that influxdb.service status was active (running) but I couldn't access the database. The permissions were wrong in the /var/opt/influxdb folder. To fix it:
chown -R influxdb:influxdb /var/opt/influxdb
If you look in the "influxdb.service" file
less /etc/systemd/system/influxdb.service
You'll see:
[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://docs.influxdata.com/influxdb/
After=network-online.target
[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb
ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf $INFLUXD_OPTS
KillMode=control-group
Restart=on-failure
[Install]
WantedBy=multi-user.target
Alias=influxd.service
The important lines being the User=influxdb and Group=influxdb. The service is started by an influxdb user which is created when using the service. So the permissions have to reflect that the "influxdb" user is running the show.