Installing InfluxDB on Ubuntu

Installing Golang

First we need a C compiler:

apt-get update
apt-get install build-essential git

Now we need to add Go PATH to ~/.bashrc.

nano ~/.bashrc

Copy and paste this on the bottom of the ~/.bashrc file:

export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN

Press Control + X to exit from Nano, it will ask you to press Y and then ENTER. Now the file is saved.

Let's reload the ~/.bashrc:

source ~/.bashrc

With those settings, the Go repositories will be downloaded in $HOME/go/src
And Go builds will be installed in $HOME/go/bin

Now, let's download, compile and install Go:

cd /tmp/
wget https://storage.googleapis.com/golang/go1.4.2.src.tar.gz
tar -xvf go1.4.2.src.tar.gz
cd go/src
./all.bash #install Golang
hash -r    #refresh PATH

Compiling latest InfluxDB

go get github.com/influxdb/influxdb
cd $GOPATH/src/github.com/influxdb/
go get ./...
go install ./...

Starting InfluxDB

InfluxDB binaries will be located in $HOME/go/bin/influxd and $HOME/go/bin/influx
As it is already in your PATH you can start InfluxDB with influxd command

root@IoT:~# influxd

 8888888           .d888 888                   8888888b.  888888b.
   888            d88P"  888                   888  "Y88b 888  "88b
   888            888    888                   888    888 888  .88P
   888   88888b.  888888 888 888  888 888  888 888    888 8888888K.
   888   888 "88b 888    888 888  888  Y8bd8P' 888    888 888  "Y88b
   888   888  888 888    888 888  888   X88K   888    888 888    888
   888   888  888 888    888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
 8888888 888  888 888    888  "Y88888 888  888 8888888P"  8888888P"

2016/01/08 17:07:31 InfluxDB starting, version 0.9, branch unknown, commit unknown, built unknown
2016/01/08 17:07:31 Go version go1.4.2, GOMAXPROCS set to 1
2016/01/08 17:07:31 no configuration provided, using default settings
[metastore] 2016/01/08 17:07:31 Using data dir: /root/.influxdb/meta
[metastore] 2016/01/08 17:07:31 Skipping cluster join: already member of cluster: nodeId=1 raftEnabled=true peers=[localhost:8088]

Now open the web admin at http://influxdb-ip:8083

Source