Skip to content

Building InfluxDB

linuxonz edited this page Dec 4, 2025 · 36 revisions

Building InfluxDB

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

  • Ubuntu (22.04, 24.04, 25.04, 25.10) have 1.6.7

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

  • RHEL (8.10, 9.4, 9.6, 10.0)
  • SLES 15 SP7
  • Ubuntu (22.04, 24.04, 25.04, 25.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.

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.6.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.6.0/patch

2.1. Install Basic Dependencies

  • RHEL 8.10

    sudo yum install -y clang git wget curl patch pkg-config python3.12 python3.12-devel unzip
    sudo yum install -y gcc-toolset-11 gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-libatomic-devel gcc-toolset-11-libstdc++-devel
    source /opt/rh/gcc-toolset-11/enable
  • 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 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, 25.10)

    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

2.2. 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

2.2. 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

3.1 Setup Arrow-rs

cd $SOURCE_ROOT
git clone https://github.com/apache/arrow-rs.git
cd arrow-rs
git checkout 55.2.0
curl -sSL ${PATCH_URL}/arrow.patch | patch -p1 || error "arrow.patch"

3.2 Build and install InfluxDB

cd $SOURCE_ROOT
git clone --depth 1 -b v3.6.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

3.3 Verify the version of InfluxDB

influxdb3 --version

Output should be similar to:

influxdb3 3.6.0, revision 7e07b134f4e91b2bbf492b22be99b2bb748a6172

3.4 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