InfluxDB is a widely adopted time series database system used in storage of time-stamped data. Some of these data include system metrics, system events, industrial sensor data, rainfall measurements, stock prices , and many others meant for analysis. InfluxDB v2 is the latest release of InfluxDB with a lot of improvements from v1. In this article we take a closer look at the process of installing InfluxDB v2 on Ubuntu 24.04 (Noble Numbat).
Step 1: System update
Before we can do the installation, let’s ensure our system is up-to-date.
sudo apt update
An upgrade can also be performed depending on the current system uptime needs.
sudo apt upgrade -y
If an upgrade is performed it might make sense to reboot if required.
[ -f /var/run/reboot-required ] && sudo reboot -f
Step 2: Add InfluxDB APT Repository
The InfluxDB team provides an APT repository for Debian based systems. Add the repository to your system using the commands below.
sudo tee /etc/apt/sources.list.d/influxdb.list<<EOF
deb [signed-by=/usr/share/keyrings/influxdb-keyring.gpg] https://repos.influxdata.com/ubuntu jammy stable
EOF
Import the InfluxDB GPG key used in signing of the packages.
curl -fsSL https://repos.influxdata.com/influxdata-archive_compat.key|sudo gpg --dearmor -o /usr/share/keyrings/influxdb-keyring.gpg
With the repository added and GPG key imported, update system package lists.
sudo apt update
Step 3: Install InfluxDB on Ubuntu 24.04
The next step is actual installation of InfluxDB v2 on Ubuntu 24.04 Linux system.
sudo apt install influxdb2
Command execution output:
eading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
influxdb2-cli
The following NEW packages will be installed:
influxdb2 influxdb2-cli
0 upgraded, 2 newly installed, 1 to remove and 9 not upgraded.
Need to get 58.8 MB of archives.
After this operation, 20.9 MB disk space will be freed.
Do you want to continue? [Y/n] y
You can start and enable the service for automatic starting.
sudo systemctl start influxdb && sudo systemctl enable influxdb
Step 4: Using InfluxDB v2
Confirm status of InfluxDB service.
$ systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-05-03 16:02:34 UTC; 2s ago
Docs: https://docs.influxdata.com/influxdb/
Main PID: 1983 (influxd)
Tasks: 7 (limit: 2255)
Memory: 45.0M (peak: 62.8M)
CPU: 656ms
CGroup: /system.slice/influxdb.service
└─1983 /usr/bin/influxd
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.233927Z lvl=info msg="Open store (end)" log_id=0ownwDm0000 service=storage-engine service=store op_name=tsdb_open op_eve>
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.233959Z lvl=info msg="Starting retention policy enforcement service" log_id=0ownwDm0000 service=retention check_interval>
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.233978Z lvl=info msg="Starting precreation service" log_id=0ownwDm0000 service=shard-precreation check_interval=10m adva>
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.236377Z lvl=info msg="Starting query controller" log_id=0ownwDm0000 service=storage-reads concurrency_quota=1024 initial>
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.253073Z lvl=info msg="Configuring InfluxQL statement executor (zeros indicate unlimited)." log_id=0ownwDm0000 max_select>
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.272383Z lvl=info msg=Listening log_id=0ownwDm0000 service=tcp-listener transport=http addr=:8086 port=8086
May 03 16:02:34 noble influxd-systemd-start.sh[1983]: ts=2024-05-03T16:02:34.272778Z lvl=info msg=Starting log_id=0ownwDm0000 service=telemetry interval=8h
May 03 16:02:34 noble influxd-systemd-start.sh[2002]: Command "print-config" is deprecated, use the influx-cli command server-config to display the configuration values from the running server
May 03 16:02:34 noble influxd-systemd-start.sh[1982]: InfluxDB started
May 03 16:02:34 noble systemd[1]: Started influxdb.service - InfluxDB is an open-source, distributed, time series database.
Using InfluxDB UI
You can use InfluxDB UI that provides a web-based visual interface from where you can interact with and administer your InfluxDB server. This UI is packaged as part InfluxDB. To access InfluxDB web UI, visit http://serverip:8086 in your browser.

Click “Get Started” to begin the initial configurations. Create initial admin user, bucket, and organization.

Copy token printed in the next page.

You are ready to go in a few seconds. Explore documentation pages on how to send data to InfluxDB database.

Using CLI
To connect to InfluxDB from CLI you will need:
- InfluxDB Host
- Organization name
- Token
The syntax used is
influx config create --config-name CONFIG_NAME \
--host-url http://localhost:8086 \
--org ORG \
--token API_TOKEN \
--active
You can use the token generated earlier. If this is lost create a new one under Load Data–>API Tokens

Use “Generate api token” button to create a new token.

Give the token a name.

Copy the contents of the token and use to connect. We can save these two as variables.
API_TOKEN="EFNTYNar0wp3FdzL1wM-HAnKI_2WTogSSosfXTKiVGLLcAiW5QV7-60adV_D2mzSpGrFj5HyHOF9ArKNTl-UIQ=="
ORG="CloudSpinx"
Create influx CLI config and set it as active:
influx config create --config-name influx01 \
--host-url http://localhost:8086 \
--org $ORG \
--token $API_TOKEN \
--active
Our connection state:
Active Name URL Org
* influx01 http://localhost:8086 CloudSpinx
You can get more information about influx
CLI commands on CLI reference documentation.