How to Install InfluxDB on Elementary OS Latest
InfluxDB is a time-series database built specifically to handle high write and query loads for metrics and events data. In this tutorial, we will show you how to install InfluxDB on Elementary OS Latest.
Prerequisites
Before we begin, ensure that you have the following:
- A server or virtual machine running Elementary OS Latest
- A non-root user with sudo privileges
Steps to Install InfluxDB
Update the local package index:
sudo apt-get updateInstall the necessary packages to support InfluxDB:
sudo apt-get install apt-transport-httpsAdd the InfluxDB repository key:
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -Add the InfluxDB repository to your sources list:
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.listRun
apt-get updateagain to update the newly added repository:sudo apt-get updateInstall InfluxDB:
sudo apt-get install influxdbStart the InfluxDB service:
sudo systemctl start influxdbVerify that InfluxDB is running:
sudo systemctl status influxdbThe output should show that the service is
active (running).By default, InfluxDB listens on
localhostport8086. If you want to access InfluxDB from remote clients, you need to edit the configuration file to allow traffic on the port:sudo nano /etc/influxdb/influxdb.confFind the
[http]section and uncomment thebind-addressandauth-enabledlines:[http] # Determines whether HTTP endpoint is enabled. enabled = true # The bind address used by the HTTP service. # bind-address = ":8086" bind-address = "0.0.0.0:8086" # Determines whether user authentication is enabled over HTTP/HTTPS. auth-enabled = trueSave and close the file.
Restart the InfluxDB service for the changes to take effect:
sudo systemctl restart influxdb
Conclusion
InfluxDB is now installed and running on your Elementary OS Latest system. You can begin using it by sending data using its API or by using one of the many client libraries that are available.