This is a guide for installation of InfluxDB on Raspberry Pi 4 running Ubuntu Server 21.10.
This guide is written for installation on Raspberry Pi however setup would be nearly identical on a VPS.
InfluxDB is an open source time series database developed by InfluxData. It is a great database for storing large amounts of timestamped data which is perfect for IoT sensors. InfluxDB V2.X is now available which is a major upgrade however for now I am sticking with V1.8 for my projects until I have more time to understand any issues with migration.
1. Install Ubuntu Server 21.10.
2. Install InfluxDB
The vendor repositories from InfluxData will be used.
Installed Version: 1.8.10-1
See the following link for the lastest stable releases:
The installation assumes user has root access
- Switch to root environment
- Update Repositories
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt-get install -y influxdb
- Enable services
systemctl enable influxdb
systemctl start influxdb
- The successful start can be verified via
systemctl status influxdb.service
- switch back to user account
Configure InfluxDB for use with your sensors
Create basic example Database with the following parameters
- database name: my_sensors (no retention policies)
- user: my_sensors_user
- password: my_sensors_password
- Start influx console
- create database within InfluxDB console
> create database my_sensors > use my_sensors > create user my_sensors_user with password 'my_sensors_password' with all privileges > grant all privileges on my_sensors to my_sensors_user > exit