Skip to content

Building InfluxDB

linuxonz edited this page Sep 25, 2025 · 34 revisions

Building InfluxDB

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

  • SLES 15 SP6 has 1.11.1
  • Ubuntu (22.04, 24.04, 25.04) have 1.6.7

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

  • RHEL (8.10, 9.4, 9.6, 10.0)
  • SLES (15 SP6, 15 SP7)
  • Ubuntu (22.04, 24.04, 25.04)

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.

Build and Install InfluxDB

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/3.3.0/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.

2. Install dependencies

export SOURCE_ROOT=/<source_root>/
PATCH_URL=https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/InfluxDB/3.3.0/patch
  • RHEL 8.10

    sudo yum install -y clang git wget curl patch pkg-config python3.12 python3.12-devel unzip
  • RHEL (9.4, 9.6, 10.0)

    sudo yum install -y clang git wget protobuf protobuf-devel curl patch pkg-config python3 python3-devel
  • SLES (15 SP6, 15 SP7)

    sudo zypper install -y git wget which protobuf-devel curl patch pkg-config clang gawk make python311 python311-devel && \
    sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 60
  • Ubuntu (22.04, 24.04, 25.04)

    sudo apt-get update
    sudo apt-get install -y  build-essential pkg-config libssl-dev clang curl git protobuf-compiler python3 python3-dev python3-pip python3-venv libprotobuf-dev
  • Install Protobuf (RHEL 8.x only)

    cd $SOURCE_ROOT
    wget https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-s390_64.zip
    sudo unzip -q protoc-32.0-linux-s390_64.zip -d /usr/local/
    rm protoc-32.0-linux-s390_64.zip
  • Install Rust

    cd $SOURCE_ROOT
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
    source $HOME/.cargo/env
    cargo install cargo-nextest --locked # If you need to run InfluxDB test suite

3. Build and Install InfluxDB

  • Setup Arrow-rs

    cd $SOURCE_ROOT
    git clone https://github.com/apache/arrow-rs.git
    cd arrow-rs
    git checkout eae176c21b1ef915227294e8a8a201b6f266031a
    curl -sSL ${PATCH_URL}/arrow.patch | patch -p1 || error "arrow.patch"
  • Build and install InfluxDB

    cd $SOURCE_ROOT
    git clone --depth 1 -b v3.3.0 https://github.com/influxdata/influxdb.git
    cd influxdb
    curl -sSL ${PATCH_URL}/influxdb.patch | patch -p1 || error "influxdb.patch"
    sed -i "s|SOURCE_ROOT|$SOURCE_ROOT|g" Cargo.toml
    cargo build --profile release
    sudo cp ./target/release/influxdb3 /usr/bin
  • Verify the version of InfluxDB

    influxdb3 --version

    Output should be similar to:

    influxdb3 3.3.0, revision 02d7ee1e6fec5b62debbe862881562e451624de6
  • Start the InfluxDB service

    influxdb3 serve --object-store file --data-dir ~/.influxdb3 --node-id my-node-1

4: Test (optional)

cd $SOURCE_ROOT/influxdb
cargo nextest run --workspace --nocapture --no-fail-fast

References:

Clone this wiki locally