Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install InfluxDB in Windows

Tags:

I am new to InfluxDB. I could not find any details about installing InfluxDB on Windows. Is there any way to install it on a Windows machine or do I need to use a Linux server for development purposes?

like image 326
Sajith Avatar asked Sep 30 '14 08:09

Sajith


People also ask

Does InfluxDB work on Windows?

The current 0.9 branch of influxdb is pure go and can be compiled on Windows with the following commands: cd %GOPATH%/src/github.com/influxdb go get -u -f ./... go build ./... Of course you will need go (>1.4), git and hg. To run InfluxDB, type: influxd.exe .


3 Answers

The current 0.9 branch of influxdb is pure go and can be compiled on Windows with the following commands:

cd %GOPATH%/src/github.com/influxdb
go get -u -f ./...
go build ./...

Of course you will need go (>1.4), git and hg.

If you do not want to compile your own version, you can also find here my own Windows x86 binaries for v0.9.0-rc11: https://github.com/adriencarbonne/influxdb/releases/download/v0.9.0-rc11/influxdb_v0.9.0-rc11.zip

To run InfluxDB, type: influxd.exe.

Or even better, create the following config file, save it as influxdb.conf and run influxd --config influxdb.conf:

reporting-disabled = true

#[logging]
#level = "debug"
#file = "influxdb.log"

[admin]
enabled = true
port = 8083

[api]
port = 8086

[data]
dir = "data"

[broker]
dir = "broker"
like image 180
adrien Avatar answered Sep 25 '22 19:09

adrien


I struggled quite a lot with this issue, so I'll post the full process step by step. This will hopefully help other people that lands on this post.

Table of contents:

Edit: WARNING, this doesn't work if Go and projects folder are installed to a custom path (not c:\go). In this case go get breaks with cryptic messages about unrecognized import paths (thanks to user626528 for the info)

  1. PREVIOUS DOWNLOADS
  2. COMPILATION
  3. EXECUTION

1. PREVIOUS DOWNLOADS

Go for Windows (get the .msi): https://golang.org/dl/

GIT for Windows: http://git-scm.com/download/win


2. COMPILATION

cd to C:\Go

Create our $GOPATH in "C:\Go\projects" (anywhere but C:\Go\src, which is the $GOROOT).

> mkdir projects

Set to $GOPATH variable to this new directory:

> set GOPATH=C:\Go\projects

Pull the influxdb code from github into our $GOPATH:

> go get github.com/influxdata/influxdb

cd to C:\Go\projects\github.com\influxdata\influxdb

Pull the project dependencies:

> go get -u -f ./...

Finally, build the code:

> go build ./...

...this will create 3 executables under C:\Go\projects\bin:

influx.exe 
influxd.exe
urlgen.exe

3. EXECUTION

To start the service:

influxd -config influxdb.conf

For that, you first need to create a influxdb.conf file with the following text:

reporting-disabled = true

#[logging]
#level = "debug"
#file = "influxdb.log"
#write-tracing = false

[admin]
enabled = true
port = 8083

[api]
port = 8086

[data]
dir = "data"

[broker]
dir = "broker"

Once the service is started, you can execute Chrome and go to http://localhost:8083, and start playing with InfluxDb.

Default values for username and password are:

username: root
password: root
like image 44
Xavier Peña Avatar answered Sep 24 '22 19:09

Xavier Peña


Few updates to Xavier Peña solution to build latest influxdb. Notice the difference in github URL and the path.

C:\Go\projects>go get github.com/influxdata/influxdb

C:\Go\projects>go get github.com/sparrc/gdm

C:\Go\projects>cd C:\Go\projects\src\github.com\influxdata\influxdb

C:\Go\projects\src\github.com\influxdata\influxdb>go get -u -f ./...

C:\Go\projects\src\github.com\influxdata\influxdb>c:\Go\projects\bin\gdm.exe restore

C:\Go\projects\src\github.com\influxdata\influxdb>go build ./...

C:\Go\projects\src\github.com\influxdata\influxdb>go install ./...

C:\Go\projects\bin>influxd config > influxdb.generated.conf

C:\Go\projects\bin>influxd -config influxdb.generated.conf
like image 39
Rajesh Avatar answered Sep 23 '22 19:09

Rajesh