InfluxDB OSS installation locally or on AWS EC2

This post demonstrates the process of installing the OSS version of InfluxDB locally or on an AWS EC2 instance, running Ubuntu 18.04/20.04.

InfluxDB is a time series database designed to handle high write and query loads. Sensor data used in IoT applications can be logged in this time series DB.

‘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, IoT sensor data, and real-time analytics.’

Installation of InfluxDB locally or in an AWS EC2 instance

  1. Spin up an AWS EC2 instance with the following specifications
    • Ubuntu 18.04 Server LTS OS
    • 2 vCPUs, 4 GB RAM
    • In Security policy,
      • Open SSH Port 22 to be accessed only from your local machine
      • Open TCP Port 1880 to be accessed from any IP (0.0.0.0/0)
  2. In the terminal, Update your Ubuntu repositories
sudo apt update
  1. Download the InfluxDB repository sources & Unpack it
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.6_amd64.deb
sudo dpkg -i influxdb_1.8.6_amd64.deb

OR

wget -qO- https://repos.influxdata.com/influxdb.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdb.gpg
export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc)
echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" > /etc/apt/sources.list.d/influxdb.list
  1. Install InfluxDB in your machine
sudo apt-get update
sudo apt-get install influxdb
  1. Start InfluxDB service
sudo service influxdb start
  1. Start InfluxDB in your terminal via command
influx

OR

influx -precision rfc3339
  1. You should get the following output. If so, then your installtion is proper.
Node-RED on AWS EC2 instance

Node-RED on AWS EC2 instance

You are now ready to explore InfluxDB.