Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:4paradigm OpenMLDB Linux Runtime

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Deployment
Last Updated 2026-10-12 16:00 GMT

Overview

Linux (Ubuntu 22.04 or CentOS 7) runtime with JDK 11, Python 3, and pre-compiled C++ dependencies for running the OpenMLDB server binary.

Description

This environment provides the base Linux runtime for executing the OpenMLDB single-binary server (openmldb). The binary is a C++ executable compiled with gcc 8+, linked against RocksDB, ZooKeeper C client, brpc, LLVM, ZetaSQL, protobuf, and tcmalloc. The build Docker image is based on Ubuntu 22.04 while the demo/runtime Docker image is based on openjdk:11.0.13-jre-slim-bullseye. Both x86_64 and aarch64 architectures are supported. The runtime requires libgomp1 (OpenMP), libicu, and python3 for SDK and demo scripts. Core dumps are enabled via ulimit -c unlimited for debugging.

Usage

Use this environment for any OpenMLDB deployment — standalone, onebox cluster, or Docker Compose demo. It is the mandatory prerequisite for running the setup_openmldb_sh script, all server role startups (tablet, nameserver, client), and the demo test suite.

System Requirements

Category Requirement Notes
OS Ubuntu 20.04+ / CentOS 7+ Kernel 5.x recommended; pre-compiled thirdparty built on CentOS 7 with gcc 8
Hardware x86_64 or aarch64 Both architectures supported with pre-compiled deps
Disk 10GB+ SSD Binlog and RocksDB storage require high IOPS
Memory 2GB+ minimum max_memory_mb flag defaults to 0 (unlimited)
ulimit ulimit -c unlimited Required for core dump generation during debugging

Dependencies

System Packages

  • openjdk-11-jdk (build) / openjdk:11.0.13-jre-slim (runtime)
  • libgomp1 — OpenMP runtime library
  • libicu-dev — ICU unicode support
  • python3 and python3-pip — for SDK and demo scripts
  • curl, binutils, procps — utility tools
  • flex, doxygen, lcov — build-time only
  • git — for source build

Build Dependencies (from source)

  • gcc >= 8.0
  • cmake >= 3.10
  • bazel 1.0.0 or bazelisk — for ZetaSQL build
  • bison, libtool, tcl, pkg-config
  • python3-dev / python3-devel
  • libcppunit-dev / libcppunit-devel

Pre-compiled Third-party Libraries

  • zetasql (v0.3.5+)
  • hybridsql-asserts thirdparty (v0.7.1+)
  • rocksdb
  • brpc
  • zookeeper C client
  • protobuf
  • llvm
  • tcmalloc
  • yaml-cpp
  • openssl, zlib, snappy

Python Packages

  • openmldb (pip, runtime SDK)
  • openmldb-tool (pip, ops CLI)
  • py4j == 0.10.9
  • pandas == 1.5
  • numpy >= 1.26.4
  • lightgbm == 3
  • xgboost == 1.4.2
  • tornado, requests

Credentials

No credentials required for basic operation. The following are optional:

  • OPENMLDB_BIN_PATH — path to openmldb binary (for ops tools)
  • THIRD_PARTY_DIR — path to pre-compiled dependencies (default: /deps/usr)
  • THIRD_PARTY_SRC_DIR — path to third-party source (default: /deps/src)
  • LD_LIBRARY_PATH — must include /deps/usr/lib:/deps/usr/lib64

Quick Install

# Runtime packages (Debian/Ubuntu)
apt-get update && apt-get install -y --no-install-recommends \
    libgomp1 curl binutils procps python3 python3-pip

# Install OpenMLDB Python SDK and tool
pip install openmldb openmldb-tool

# Build from source (Ubuntu 22.04)
apt-get install -y build-essential libicu-dev python3-dev python3-pip \
    openjdk-11-jdk flex doxygen lcov git curl
curl -SLO https://github.com/4paradigm/OpenMLDB/releases/latest/download/openmldb-0.9.2-linux.tar.gz
tar xzf openmldb-*.tar.gz -C /work/openmldb --strip-components 1

Code Evidence

Binary existence check from `onebox/start_onebox.sh:25-29`:

OPENMLDB_BIN=${OPENMLDB_BIN:-build/bin/openmldb}
if [ ! -r "$OPENMLDB_BIN" ]; then
    echo "openmldb binary: $OPENMLDB_BIN not exist"
    exit 1
fi

Core dump enablement from `onebox/start_onebox.sh:22-23`:

# allow producing core files
ulimit -c unlimited

Architecture detection from `docker/setup_deps.sh:70-77`:

if [[ $INPUT = 'i386' || $INPUT = 'x86_64' || $INPUT = 'amd64' ]]; then
    ARCH=x86_64
elif [[ $INPUT = 'aarch64' || $INPUT = 'arm64' ]]; then
    ARCH=aarch64
else
    echo "Unsupported arch: $INPUT"
    exit 1
fi

GCC version check from `src/CMakeLists.txt:76-79`:

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
    # GNU implementation prior to 9.1 requires linking with -lstdc++fs
    list(APPEND TEST_LIBS stdc++fs)
endif()

Common Errors

Error Message Cause Solution
openmldb binary: ... not exist OPENMLDB_BIN path is wrong or binary not built Set OPENMLDB_BIN env var or build from source
Unsupported arch Running on unsupported CPU architecture Use x86_64 or aarch64; build thirdparty from source with -DBUILD_BUNDLED=ON
no pre-compiled thirdparty for your OS Running on unsupported Linux distro Build from source with -DBUILD_BUNDLED=ON
libgomp.so.1: cannot open shared object file Missing OpenMP runtime apt-get install libgomp1
ZooKeeper compilation failure gcc >= 9 incompatibility Apply patch with -DBUILD_ZOOKEEPER_PATH=ON

Compatibility Notes

  • CentOS 7: Pre-compiled thirdparty libraries are built on CentOS 7 with gcc 8; fully compatible.
  • Ubuntu 22.04: Build Docker image uses Ubuntu 22.04; pre-compiled thirdparty works via ubuntu variant.
  • aarch64 (ARM64): Pre-compiled thirdparty may be out-of-date; consider -DBUILD_BUNDLED=ON.
  • macOS (Darwin): Pre-compiled thirdparty available for i386; not production-supported.
  • Windows: Not supported; use Docker or WSL2.
  • CentOS 6: Legacy CI build available via steps/centos6_build.sh using devtoolset-8.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment