How to Install InfluxDB on Raspbian 10 11 - ytyou/ticktock GitHub Wiki
The following commands were executed in Raspbian 11 (Bullseye) but also work for Raspbian 10 (Buster).
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
$ sudo apt update
$ sudo apt upgrade
$ wget -q https://repos.influxdata.com/influxdata-archive_compat.key
$ echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
$ echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
$ sudo apt update
$ sudo apt install influxdb
$ sudo systemctl unmask influxdb.service
$ sudo systemctl start influxdb
$ curl -G http://localhost:8086/query --data-urlencode "q=SHOW DATABASES"
$ influx
Connected to http://localhost:8086 version 1.8.10
InfluxDB shell version: 1.8.10
> show DATABASES;
name: databases
name
----
_internal
> quit
$
To uninstall:
sudo apt-get purge --auto-remove influxdb
Troubleshooting:
- After uninstall Influxdb above and still unable to update due to
NO_PUBKEY D8FF8E1F7DF8B07E
ylin30@rpi4:~/ticktock $ sudo apt-get update
Get:1 https://repos.influxdata.com/debian bullseye InRelease [7,022 B]
Err:1 https://repos.influxdata.com/debian bullseye InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:3 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Fetched 7,022 B in 6s (1,084 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repos.influxdata.com/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
W: Failed to fetch https://repos.influxdata.com/debian/dists/bullseye/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
W: Some index files failed to download. They have been ignored, or old ones used instead.
ylin30@rpi4:~/ticktock $
- Find related Influxdb configs in OS.
ylin30@rpi4:~/ticktock $ ls /etc/apt/sources.list.d/
influxdb.list raspi.list
ylin30@rpi4:~/ticktock $ sudo cat /etc/apt/sources.list.d/influxdb.list
deb [signed-by=/usr/share/keyrings/influxdb-archive-keyring.gpg] https://repos.influxdata.com/debian bullseye stable
ylin30@rpi4:~/ticktock $ ls /usr/share/keyrings/influxdb-archive-keyring.gpg
/usr/share/keyrings/influxdb-archive-keyring.gpg
- Then remove them.
ylin30@rpi4:~/ticktock $ sudo rm /usr/share/keyrings/influxdb-archive-keyring.gpg
ylin30@rpi4:~/ticktock $ sudo rm /etc/apt/sources.list.d/influxdb.list
- Try
apt-get update
again.
ylin30@rpi4:~/ticktock $ sudo apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Reading package lists... Done
ylin30@rpi4:~/ticktock $