Skip to content

Building InfluxDB

Cindy Lee edited this page Apr 16, 2020 · 33 revisions

Building InfluxDB

Below version of InfluxDB is available in respective distributions at the time of creation of these build instructions:

  • Ubuntu 16.04 have 0.10.0
  • Ubuntu 18.04 have 1.1.1
  • Ubuntu 19.10 have 1.6.4

The DRAFT instructions provided below specify the steps to build InfluxDB version 1.7.10 on Linux on IBM Z for the following distributions:

  • RHEL (7.5, 7.6, 7.7, 8.1)
  • SLES (12 SP4, 12 SP5, 15 SP1)
  • Ubuntu (16.04, 18.04, 19.10)

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.
  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Building and Installing InfluxDB

Step 1: Build using script

If you want to build InfluxDB using manual steps, go to Step 2.

Use the following commands to build InfluxDB using the build script. Please make sure you have wget installed.

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/InfluxDB/1.7.10/build_influxdb.sh
# Build InfluxDB
bash build_influxdb.sh   [Provide -t option for executing build with tests]

In case of error, check logs for more details or go to STEP 2 to follow manual build steps.

Step 2: Install the Dependencies

export SOURCE_ROOT=/<source_root>/
  • RHEL (7.6, 7.7, 7.8, 8.1)

    sudo yum install -y git gcc wget tar
  • SLES (12 SP4, 12 SP5, 15 SP1)

    sudo zypper install -y git gcc gcc-c++ wget tar gzip
  • Ubuntu (16.04, 18.04, 19.10)

    sudo apt-get install -y git gcc g++ wget tar
  • Install Go 1.13.8

    wget https://storage.googleapis.com/golang/go1.13.8.linux-s390x.tar.gz
    sudo tar -C /usr/local -xzf go1.13.8.linux-s390x.tar.gz
    export PATH=/usr/local/go/bin:$PATH
    export PATH=$(go env GOPATH)/bin:$PATH
    
    # RHEL/SLES only
    sudo ln /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc

Step 3: Build and install InfluxDB

  • Installing InfluxDB

    cd $SOURCE_ROOT
    export GO111MODULE=on
    git clone https://github.com/influxdata/influxdb.git
    cd influxdb
    git checkout v1.7.10
    rm go.mod && go mod init
    go clean ./...
    go build ./...
    go install -ldflags="-X main.version=v1.7.10" ./...

    The binaries can be found under $(go env GOPATH)/bin.

Step 4: Test (optional)

cd $SOURCE_ROOT/influxdb
go test -v ./...

Note: There are some test failures and they are currently being investigated.

References:

https://github.com/influxdata/influxdb/blob/1.7/CONTRIBUTING.md#build-and-test https://docs.influxdata.com/influxdb/v1.7/introduction/getting-started/

Clone this wiki locally