top of page

LearningMilestone by Anuradha Agarwal is a one-stop place for coding classes for kids and workshops for teachers and parents and self-paced courses, a blog for everyone to learn python programming with a personalized approach by an experienced instructor with a decade of experience in the software industry.

  • Writer's pictureAnuradha Agarwal

Steps to Setup InfluxDB on Windows

This post details steps to set up InfluxDB on Windows.


To visit more such posts follow hashtag - #RealTimeMonitoring


MILESTONE STEPS


Step 1 - Download InfluxDB

Step 2 - Configure InfluxDB instance

Step 3 - Start InfluxDB server

Step 4 - Verify Configuration

Step 5 - Start as Service

Step 6 - Run InfluxDB client & Get Started



In new window scroll till you reach Window binaries.

  • Click on the URL in the box, and the download will start

  • Unzip the downloaded file to a preferred location

  • Below is the file content after extraction:

  • Below 3 files are of interest to us for now:

influx.exe: Command-line interface to connect to the database & execute queries

influxd.exe: Launch InfluxDB server

influxdb.conf : Configure InfluxDB instance

  • Configure InfluxDB instance by editing conf file as below :

Add folders named data, meta & wal inside the parent folder where InfluxDB is extracted:


Open conf file for editing:


Change the following sections:

Note double slash instead of single!


Meta Section

[meta]
  # Where the metadata/raft database is stored
  dir = "<Location of meta folder>\\meta"

Data Section

[data]
  # The directory where the TSM storage engine stores TSM files.
  dir = "<Location of meta folder>\\data"

  # The directory where the TSM storage engine stores WAL files.
  wal-dir = "<Location of meta folder>\\wal

HTTP Section


Below are default settings.This relates to http end point which interacts with InfluxDB.Change in case different port is to be used.

[http]
  # Determines whether HTTP endpoint is enabled.
  #enabled = true

  # The bind address used by the HTTP service.
  #bind-address = ":8086"

  # Determines whether HTTP request logging is enabled.
  #log-enabled = true

Start the InfluxDB server by double-clicking influxd or by going to command prompt & running command.

You might get firewall permission issue and need to accept to take it forward.

Finally, you should see below:


  • By default, logs are shown on standard output console. To redirect log output to file:

Go to the command prompt > location of InfluxDB directory

Run below command:

  • If you do any changes in conf file, run below command to make changes effective:

Since HTTP endpoint is enabled in the conf file, we can check by launching HTTP endpoint at configured port.

Launch url - http://localhost:8086/query .Below page should follow:

We need to start InfluxDB server by the above way every time we want to get started which is a hassle.It is preferable to run it as service for the same reason.

To run InfluxDB as a service:

  • Download nssm utility

  • Open a command prompt as an admin and go to the location of nssm utility command

nssm install
  • Following window should open to configure service.

  • Enter the path for InfluxD & conf file as below:

  • Argument -> -config "<location of dir>/influxdb.conf"

  • ServiceName--> InfluxDB

  • Startup type -->Automatic

  • Service start successfully message should be received once pressed ok




  • Double click marked exe to start Influx CLI

  • You should see below interface


Congratulations! You are ready to create DB, measurements and perform IFQL commands!

Check out next post for next steps - InfluxDB CLI - Begin with Influx database

 

22,047 views1 comment

Recent Posts

See All
bottom of page