×


Install InfluxDB on Ubuntu 20.04 LTS - Step by step guide ?



InfluxDB is a time-series database (TSDB) that is designed to handle high write and query loads, InfluxDB is developed by InfluxData and written in Go. InfluxDB is meant to be used as a backing store for any use case involving large amounts of timestamped data, including DevOps monitoring, application metrics, and many more.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related database queries.

In this context, we shall look into how to install InfluxDB on Ubuntu 20.04 LTS. 


Steps to Install and configure InfluxDB on Ubuntu 20.04 LTS Focal Fossa

1. Perform System Update

First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal:

$ sudo apt update
$ sudo apt upgrade


2. Install InfluxDB on the system

Now we add the InfluxDB repository to the Ubuntu system:

$ wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

Next, we will continue to update the system and install and start the InfluxDB:

$ sudo apt update
$ sudo apt install influxdb

Once successfully installed, Start and enable the service to start on bootup:

$ sudo systemctl enable --now influxdb


3. Configure InfluxDB

The configuration file is located at /etc/influxdb/influxdb.conf:

$ nano /etc/influxdb/influxdb.conf
[http]
  # Determines whether HTTP endpoint is enabled.
  enabled = true
  # Determines whether the Flux query endpoint is enabled.
  flux-enabled = true
  # The bind address used by the HTTP service.
  bind-address = ":8086"


4. Configure Firewall

We will open port 8086. By default, InfluxDB uses the following network ports: TCP port 8086 is used for client-server communication over InfluxDB’s HTTP API and TCP port 8088 is used for the RPC service for backup and restore:

$ sudo ufw enable
$ sudo ufw allow 8086/tcp


5. Connect and Create Database on Influxdb

Once the installation is complete and the configuration of InfluxDB was done, we will try to connect to InfluxDB and creating a new user and database:

User name: linuxapt
Password: linuxapt1
Database name : linuxapt2

The command line is as follow :

$ curl -XPOST "http://localhost:8086/query" \
--data-urlencode "q=CREATE USER linuxapt WITH PASSWORD 'linuxapt1' WITH ALL PRIVILEGES"
{"results":[{"statement_id":0}]}


[Need assistance in installing Open-source Software on your Linux system ? We can help you. ]


Conclusion

This article covers the process of installing InfluxDB on Ubuntu 20.04 LTS Focal Fossa system. In fact, InfluxDB is an open-source time-series database server that you can use to build Internet of Things (IoT) applications for data monitoring purposes which is built for developers and can handle the massive volumes of time-stamped data produced by sensors and applications.


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com

Related Post