-
Notifications
You must be signed in to change notification settings - Fork 56
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 20.04 has
1.6.4
- Ubuntu (22.04, 24.04, 24.10) have
1.6.7
The instructions provided below specify the steps to build InfluxDB version 2.7.11 on Linux on IBM Z for the following distributions:
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
- SLES (15 SP6)
- Ubuntu (20.04, 22.04, 24.04, 24.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.
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/2.7.11/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.
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.10)
sudo yum install -y clang git gcc gcc-c++ wget protobuf protobuf-devel tar curl patch pkg-config make nodejs python3 sudo ln -sf /usr/bin/python3 /usr/bin/python
-
RHEL (9.2, 9.4, 9.5)
sudo yum install -y --allowerasing clang git gcc gcc-c++ wget protobuf protobuf-devel tar curl patch pkg-config make nodejs python3 sudo ln -sf /usr/bin/python3 /usr/bin/python
-
SLES 15 SP6
sudo zypper install -y git gcc gcc-c++ wget which protobuf-devel tar gzip curl patch pkg-config nodejs20 make clang7
-
Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get update sudo apt-get install -y clang git gcc g++ wget bzr protobuf-compiler libprotobuf-dev curl pkg-config make nodejs
-
Add symlink to gcc(Only for SLES and RHEL distros)
sudo ln -sf /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc
-
Install bzr (RHEL 8.x, 9.x and SLES 15.x only)
wget https://launchpad.net/bzr/2.7/2.7.0/+download/bzr-2.7.0.tar.gz tar zxf bzr-2.7.0.tar.gz export PATH=$PATH:$HOME/bzr-2.7.0
-
Install Yarn
curl -o- -L https://yarnpkg.com/install.sh | bash export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
-
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source $HOME/.cargo/env
-
Install Go
1.22.10
export GOPATH=$SOURCE_ROOT cd $GOPATH GO_VERSION=1.22.10 wget -q https://storage.googleapis.com/golang/go"${GO_VERSION}".linux-s390x.tar.gz chmod ugo+r go"${GO_VERSION}".linux-s390x.tar.gz sudo rm -rf /usr/local/go /usr/bin/go sudo tar -C /usr/local -xzf go"${GO_VERSION}".linux-s390x.tar.gz sudo ln -sf /usr/local/go/bin/go /usr/bin/ sudo ln -sf /usr/local/go/bin/gofmt /usr/bin/ go version export PATH=$PATH:$GOPATH/bin
-
Install pkg-config
cd $SOURCE_ROOT export GO111MODULE=on go install github.com/influxdata/[email protected] which -a pkg-config
-
Build and install InfluxDB
cd $SOURCE_ROOT git clone -b v2.7.11 https://github.com/influxdata/influxdb.git cd influxdb export NODE_OPTIONS=--max_old_space_size=4096 rustup toolchain install 1.68-s390x-unknown-linux-gnu make
The binaries will be generated in
$SOURCE_ROOT/influxdb/bin/linux
. -
Verify the version of InfluxDB
bin/$(uname -s | tr '[:upper:]' '[:lower:]')/influxd version
Output should be similar to:
InfluxDB v2.7.11 (git: f302d9730c) build_date: 2024-08-27T05:35:11Z
-
Start the InfluxDB service
sudo cp $SOURCE_ROOT/influxdb/bin/linux/influxd /usr/bin/influxd influxd
Note:
- After starting InfluxDB service, you can view the UI at
http://<HOST_IP>:8086/
.
cd $SOURCE_ROOT/influxdb
make test
Notes:
Below mentioned test failures are observed in github.com/influxdata/influxdb/v2/cmd/influxd/recovery
module as it uses hard coded x86 specific test data.
- github.com/influxdata/influxdb/v2/cmd/influxd/recovery/auth
- github.com/influxdata/influxdb/v2/cmd/influxd/recovery/organization
- github.com/influxdata/influxdb/v2/cmd/influxd/recovery/user
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.