Skip to content

Dev setup (RHEL/OL10)

Glaber Development System Setup (RHEL / Oracle Linux 10.1)

This guide describes how to prepare a clean Oracle Linux 10.1 (RHEL-compatible) host for Glaber development: install runtime services, build dependencies, initialize PostgreSQL and ClickHouse, build the server from source, and run the web UI.

Target OS: Oracle Linux 10.1 (RHEL-compatible). Related docs: LIBRARIES_AND_DEPENDENCIES.md


1. Overview

Component Role Dev default
PostgreSQL Configuration database (hosts, items, triggers, users) DB glaber, user glaber, password glaber
ClickHouse History/metrics storage backend DB glaber
nginx + PHP-FPM Web UI (PHP) Serves ui/ from the repository
Node.js + npm UI frontend build (Vue, Vite, Tailwind) Build-time only
Glaber server Core daemon Built from source in the repo

Recommended minimum for development: 4 CPU, 8 GB RAM, 50 GB disk.


2. Base system preparation

Run as root or with sudo.

dnf -y update

dnf -y install \
  sudo \
  curl \
  wget \
  git \
  ca-certificates \
  gnupg2 \
  glibc-langpack-en \
  glibc-langpack-ru \
  net-tools \
  iputils \
  dejavu-sans-fonts \
  logrotate

# fping is not in default Oracle Linux repos — enable EPEL first (required for ICMP checks)
dnf -y install \
  https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm

dnf -y install fping

# Optional: create a human login account for development (not the glaber daemon user — see section 6.2)
# useradd -m -s /bin/bash glaber-dev && usermod -aG wheel glaber-dev

Clone the repository:

git clone https://gitlab.com/mikler/glaber.git
cd glaber

3. Runtime services and packages

3.1 Services to install

Service systemd unit Purpose
PostgreSQL postgresql-15 / postgresql-15.service Configuration DB
ClickHouse clickhouse-server History storage
nginx nginx HTTP reverse proxy for UI
PHP-FPM php-fpm (or php-fpm.service for your PHP version) PHP FastCGI for UI

3.2 Web / PHP packages

Glaber requires PHP >= 7.4.0 (see ui/include/classes/setup/CFrontendSetup.php).

Oracle Linux uses dnf modules / application streams for PHP. Enable a supported PHP stream (example: 8.2) and install required packages. Adjust commands if your environment uses different repositories/naming.

PHP_VER=8.2

# Example: enable a PHP module stream if needed (adjust for your OL10 repos)
# dnf -y module reset php
# dnf -y module enable php:${PHP_VER}

dnf -y install \
  nginx \
  php-fpm \
  php-cli \
  php-common \
  php-gd \
  php-bcmath \
  php-mbstring \
  php-xml \
  php-ldap \
  php-pgsql \
  php-opcache

PHP settings for the UI (example for a typical RHEL-style FPM ini path; adjust if your layout is different):

cat > /etc/php.d/99-glaber.ini <<'EOF'
max_execution_time=300
memory_limit=256M
post_max_size=16M
upload_max_filesize=2M
max_input_time=300
max_input_vars=10000
date.timezone=UTC
EOF

3.3 Build / development packages

Packages required to compile Glaber server, proxy, and agent (see configure.ac and build/*/SPECS/glaber.spec).

Several -devel packages (OpenIPMI-devel, unixODBC-devel, and others) live in the CodeReady Builder repository on Oracle Linux 10 — enable it first:

dnf -y install dnf-plugins-core
dnf config-manager --set-enabled ol10_codeready_builder
dnf -y groupinstall "Development Tools" || true

dnf -y install \
  gcc \
  gcc-c++ \
  make \
  autoconf \
  automake \
  libtool \
  pkgconfig \
  openssl-devel \
  pcre2-devel \
  libpq-devel \
  libxml2-devel \
  libevent-devel \
  libcurl-devel \
  libssh-devel \
  openldap-devel \
  boost-devel \
  OpenIPMI-devel \
  net-snmp-devel \
  net-snmp-utils \
  net-snmp \
  unixODBC-devel \
  gnutls-devel \
  zlib-devel \
  sqlite-devel \
  golang

Optional (Agent 2 / Web Service, Java gateway, UI rebuild):

# Node.js LTS (for ui/ — Vite 7 needs a current LTS)
dnf -y install nodejs npm || true

4. PostgreSQL installation and database initialization

4.1 Install PostgreSQL

Using the official PGDG repository (PostgreSQL 15). Follow the current PGDG instructions for EL 10 if URLs change.

PG_VER=15

dnf -y install \
  https://download.postgresql.org/pub/repos/yum/reporpms/EL-10.1-x86_64/pgdg-redhat-repo-EL-10.1-latest.noarch.rpm || true

dnf -y install postgresql${PG_VER}-server postgresql${PG_VER}


/usr/pgsql-${PG_VER}/bin/postgresql-${PG_VER}-setup initdb


systemctl enable --now postgresql-${PG_VER}

The pg_hba.conf file is typically in /var/lib/pgsql/${PG_VER}/data/pg_hba.conf. Use it to configure local password authentication.

4.2 Create user and database

Database name: glaber, user: glaber, password: glaber.

sudo -u postgres psql <<'EOF'
CREATE USER glaber WITH PASSWORD 'glaber';
CREATE DATABASE glaber OWNER glaber ENCODING 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE glaber TO glaber;
\c glaber
GRANT ALL ON SCHEMA public TO glaber;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO glaber;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO glaber;
EOF

Ensure local password authentication works. In pg_hba.conf add (or adjust) rules for the glaber user before broader ones, for example:

local   glaber          glaber                                  scram-sha-256
host    glaber          glaber          127.0.0.1/32            scram-sha-256
host    glaber          glaber          ::1/128                 scram-sha-256

Reload PostgreSQL:

systemctl reload postgresql-${PG_VER}

Verify login:

export PGPASSWORD=glaber
psql -h 127.0.0.1 -U glaber -d glaber -c 'SELECT 1;'

4.3 Import Glaber schema and seed data

4.3.1 Clean the database

Use this before a fresh import, or after a failed data.sql run left the database empty or inconsistent (ROLLBACK discards the whole data.sql transaction).

export PGPASSWORD=glaber

psql -h 127.0.0.1 -U glaber -d glaber <<'EOF'
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO glaber;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO glaber;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO glaber;
EOF

To drop and recreate the database entirely (requires superuser, e.g. postgres):

sudo -u postgres psql <<'EOF'
DROP DATABASE IF EXISTS glaber;
CREATE DATABASE glaber OWNER glaber ENCODING 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE glaber TO glaber;
EOF

4.3.2 Build SQL files

From the repository root (requires ./bootstrap.sh and ./configure first):

cd /path/to/glaber

make dbschema

This generates database/postgresql/schema.sql and database/postgresql/data.sql (and schemas for other supported databases). For PostgreSQL only:

make dbschema_postgresql

4.3.3 Import schema, images, and data

Import in this order. images.sql must run before data.sql: seed data references map icons (sysmaps_elements.iconid_off -> images.imageid). Importing data.sql first causes a foreign-key error and rolls back the entire transaction; later lines then only show current transaction is aborted.

cd /path/to/glaber
export PGPASSWORD=glaber

psql -h 127.0.0.1 -U glaber -d glaber -v ON_ERROR_STOP=1 -f database/postgresql/schema.sql
psql -h 127.0.0.1 -U glaber -d glaber -v ON_ERROR_STOP=1 -f database/postgresql/images.sql
psql -h 127.0.0.1 -U glaber -d glaber -v ON_ERROR_STOP=1 -f database/postgresql/data.sql

Verify:

export PGPASSWORD=glaber
psql -h 127.0.0.1 -U glaber -d glaber -c \
  "SELECT COUNT(*) AS users FROM users; SELECT COUNT(*) AS images FROM images;"

Expected: users = 2, images = 187 (approximate; depends on Glaber version).


5. ClickHouse installation and initialization

5.1 Install ClickHouse server

Use the official ClickHouse RPM repository for EL-compatible systems.

install -d /usr/share/keyrings

curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repository.key' \
  | gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg

cat > /etc/yum.repos.d/clickhouse.repo <<'EOF'
[clickhouse]
name=ClickHouse
baseurl=https://packages.clickhouse.com/rpm/lts/$releasever/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///usr/share/keyrings/clickhouse-keyring.gpg
EOF

dnf -y install clickhouse-server clickhouse-client

systemctl enable clickhouse-server
systemctl start clickhouse-server

Set a password during package configuration when prompted, or configure users in the next section.

5.2 Prevent system log tables from growing

ClickHouse writes internal diagnostics to system.* tables (query_log, query_thread_log, metric_log, asynchronous_metric_log, part_log, etc.). On a dev machine these can consume significant disk space.

Create drop-in configs under /etc/clickhouse-server/config.d/ (same approach as build/appliance/run/ansible/roles/clickhouse/files/config.d/).

Disable metric and async metric logs/etc/clickhouse-server/config.d/disable_metric_logs.xml:

<clickhouse>
    <metric_log remove="1" />
    <asynchronous_metric_log remove="1" />
</clickhouse>

Disable query thread log/etc/clickhouse-server/config.d/disable_query_thread_log.xml:

<clickhouse>
    <query_thread_log remove="1"/>
</clickhouse>

Disable part log/etc/clickhouse-server/config.d/disable_part_log.xml:

<clickhouse>
    <part_log remove="1" />
</clickhouse>

Disable other verbose system logs/etc/clickhouse-server/config.d/disable_extra_logs.xml:

<clickhouse>
    <trace_log remove="1" />
    <text_log remove="1" />
    <session_log remove="1" />
    <opentelemetry_span_log remove="1" />
    <processors_profile_log remove="1" />
</clickhouse>

Option A — disable query_log entirely/etc/clickhouse-server/config.d/disable_query_log.xml:

<clickhouse>
    <query_log remove="1" />
</clickhouse>

Option B — keep query_log with short TTL (use instead of Option A) — /etc/clickhouse-server/config.d/query_log.xml:

<clickhouse>
    <query_log replace="1">
        <database>system</database>
        <table>query_log</table>
        <flush_interval_milliseconds>30000</flush_interval_milliseconds>
        <engine>
          ENGINE = MergeTree
          PARTITION BY event_date
          ORDER BY (event_time)
          TTL event_date + INTERVAL 3 HOUR
          SETTINGS ttl_only_drop_parts=1
        </engine>
    </query_log>
</clickhouse>

Disable empty default password/etc/clickhouse-server/config.d/disable_empty_password.xml:

<clickhouse>
    <allow_no_password>0</allow_no_password>
</clickhouse>

User profile: do not log queries/etc/clickhouse-server/users.d/glaber.xml:

<clickhouse>
    <profiles>
        <default>
            <log_queries>0</log_queries>
        </default>
    </profiles>
    <users>
        <glaber>
            <password>glaber</password>
            <networks>
                <ip>::1</ip>
                <ip>127.0.0.1</ip>
            </networks>
            <profile>default</profile>
            <quota>default</quota>
        </glaber>
    </users>
</clickhouse>

Set ownership and restart:

chown -R clickhouse:clickhouse /etc/clickhouse-server/config.d /etc/clickhouse-server/users.d
systemctl restart clickhouse-server
systemctl status clickhouse-server

5.3 Create Glaber history schema

From the repository root:

cd /path/to/glaber

clickhouse-client --user glaber --password glaber --multiquery < database/clickhouse/schema.sql

Verify:

clickhouse-client --user glaber --password glaber --query "SHOW TABLES FROM glaber"

6. Build Glaber server from source

6.1 Compile and install

cd /path/to/glaber

./bootstrap.sh

./configure \
  --enable-server \
  --enable-proxy \
  --enable-agent \
  --with-postgresql \
  --with-openssl \
  --with-libcurl \
  --with-ldap \
  --with-libxml2 \
  --with-libevent \
  --with-net-snmp \
  --with-unixodbc \
  --with-ssh \
  --with-openipmi \
  --with-libpcre \
  --enable-ipv6 \
  --sysconfdir=/etc/glaber

make -j"$(nproc)"
make install

6.2 System user and runtime directories

Glaber daemons run as a dedicated glaber system account (separate from the PostgreSQL user glaber in section 4). Create the account and runtime paths before starting the server — the same layout is used in packaged installs.

# System group and user (idempotent)
getent group glaber >/dev/null || groupadd --system glaber
getent passwd glaber >/dev/null || useradd --system \
  -g glaber \
  -d /var/lib/glaber \
  -s /usr/sbin/nologin \
  -c 'Glaber Monitoring System' \
  glaber

# Config directory
install -d -m 0755 /etc/glaber

# Logs, PID/IPC sockets, value-cache dumps (see conf/zabbix_server.conf)
install -d -m 0755 -o glaber -g glaber \
  /var/lib/glaber \
  /var/log/glaber \
  /var/run/glaber \
  /var/vcdump

# Optional: SNMP trap log
install -d -m 0755 -o glaber -g glaber /var/log/snmptrap

# Recreate /run/glaber after reboot
cat > /etc/tmpfiles.d/glaber-server.conf <<'EOF'
d /run/glaber 0755 glaber glaber - -
EOF
systemd-tmpfiles --create /etc/tmpfiles.d/glaber-server.conf 2>/dev/null || true
Path Purpose
/var/lib/glaber Home directory for the glaber system user
/var/log/glaber Server/proxy logs (LogFile=...)
/var/run/glaber PID files and IPC sockets (PidFile=, SocketDir=)
/var/vcdump Value-cache dump files (ValueCacheDumpLocation=)
/etc/glaber Server/proxy/agent configuration

On RHEL / Oracle Linux, /var/run is a symlink to /run; either path works.

6.3 Server configuration

Copy the sample config and set database and ClickHouse settings:

cd /path/to/glaber

cp conf/zabbix_server.conf /etc/glaber/glaber_server.conf
chown root:glaber /etc/glaber/glaber_server.conf
chmod 640 /etc/glaber/glaber_server.conf

Edit /etc/glaber/glaber_server.conf. At minimum, set paths and credentials:

LogFile=/var/log/glaber/glaber_server.log
PidFile=/var/run/glaber/glaber_server.pid
SocketDir=/var/run/glaber

DBHost=127.0.0.1
DBName=glaber
DBSchema=public
DBUser=glaber
DBPassword=glaber

HistoryModule=clickhouse;{"url":"http://127.0.0.1:8123","username":"glaber","password":"glaber","dbname":"glaber","disable_reads":100,"timeout":10}

ValueCacheDumpLocation=/var/vcdump/
ValueCacheDumpFrequency=300

6.4 Run the server

# Foreground (dev)
cd /path/to/glaber
src/zabbix_server/glaber_server -c /etc/glaber/glaber_server.conf

# Or after make install
glaber_server -c /etc/glaber/glaber_server.conf

7. Web UI — install and run

7.1 Build frontend assets

cd /path/to/glaber/ui

npm install
npm run build:all

For active Vue/Tailwind development:

npm run dev          # Vite dev server with HMR
npm run watch:tailwind   # optional, separate terminal

See also ui/src/readme_en.md.

7.2 PHP configuration file

Create ui/conf/zabbix.conf.php from the example:

cd /path/to/glaber/ui

cp conf/zabbix.conf.php.example conf/zabbix.conf.php

Edit conf/zabbix.conf.php:

<?php
$DB['TYPE']     = 'POSTGRESQL';
$DB['SERVER']   = '127.0.0.1';
$DB['PORT']     = '5432';
$DB['DATABASE'] = 'glaber';
$DB['USER']     = 'glaber';
$DB['PASSWORD'] = 'glaber';
$DB['SCHEMA']   = 'public';

$ZBX_SERVER      = '127.0.0.1';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = 'Glaber Dev';

$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

Ensure the config file is not world-readable. On Oracle Linux/RHEL, nginx typically runs as nginx:nginx:

chown nginx:nginx conf/zabbix.conf.php
chmod 640 conf/zabbix.conf.php

7.3 PHP-FPM pool

Create /etc/php-fpm.d/glaber.conf:

[glaber]
user = nginx
group = nginx
listen = /run/php-fpm/glaber.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
pm = dynamic
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 5
mkdir -p /run/php-fpm
chown nginx:nginx /run/php-fpm
systemctl restart php-fpm

7.4 nginx site

Create /etc/nginx/conf.d/glaber.conf (replace /path/to/glaber with the actual repo path):

server {
    listen 80;
    server_name _;

    root /path/to/glaber/ui;
    index index.php;

    location = /favicon.ico {
        log_not_found off;
    }

    location / {
        try_files $uri $uri/ =404;
    }

    location /assets {
        access_log off;
        expires 10d;
    }

    location ~ /\.ht {
        deny all;
    }

    location ~ /(api/|conf[^.]|include|locale) {
        deny all;
        return 404;
    }

    location ~ [^/]\.php(/|$) {
        fastcgi_pass unix:/run/php-fpm/glaber.sock;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index index.php;

        fastcgi_param DOCUMENT_ROOT /path/to/glaber/ui;
        fastcgi_param SCRIPT_FILENAME /path/to/glaber/ui$fastcgi_script_name;
        fastcgi_param PATH_TRANSLATED /path/to/glaber/ui$fastcgi_script_name;

        include fastcgi_params;
        fastcgi_connect_timeout 60;
        fastcgi_send_timeout 180;
        fastcgi_read_timeout 180;
    }
}

Test and reload nginx:

nginx -t
systemctl reload nginx

7.5 Open the web UI

  1. Start PostgreSQL, ClickHouse, PHP-FPM, nginx, and glaber_server.
  2. Open http://<host-ip>/ in a browser.
  3. If conf/zabbix.conf.php is missing or invalid, the setup wizard at setup.php runs.
  4. Default credentials after seed import: user Admin, password zabbix (change in production).

8. Start / stop checklist

# Services
systemctl start postgresql-${PG_VER}
systemctl start clickhouse-server
systemctl start php-fpm
systemctl start nginx

# Glaber server (foreground dev run)
cd /path/to/glaber
src/zabbix_server/glaber_server -c /etc/glaber/glaber_server.conf

Quick health checks:

export PGPASSWORD=glaber
psql -h 127.0.0.1 -U glaber -d glaber -c '\dt' | head
clickhouse-client --user glaber --password glaber --query "SELECT count(*) FROM glaber.history_str"
curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1/
ss -tlnp | grep -E '5432|8123|80|10051'

9. Troubleshooting

Symptom Check
data.sql: current transaction is aborted Not encoding — an earlier statement failed. Re-run with -v ON_ERROR_STOP=1 to see the first error. Often wrong import order: use schema.sql -> images.sql -> data.sql. Clean DB (section 4.3.1) and reimport.
violates foreign key constraint "c_sysmaps_elements_2" images.sql not loaded before data.sql. Clean and reimport in correct order.
UI "Database error" PostgreSQL running; zabbix.conf.php credentials; schema imported
UI setup wizard loops ui/conf/zabbix.conf.php exists and is readable by nginx/php-fpm user
Server won't start DBPassword, DBHost, schema in /etc/glaber/glaber_server.conf; glaber user and dirs in section 6.2 exist and are owned by glaber:glaber
Server permission errors /var/log/glaber, /var/run/glaber, /var/vcdump owned by glaber:glaber; config readable by glaber
ClickHouse disk growth Log drop-ins in /etc/clickhouse-server/config.d/ applied; restart clickhouse-server
History not stored ClickHouse schema loaded; HistoryModule in server config; ClickHouse user glaber exists
PHP 500 errors nginx error log + php-fpm logs; FPM socket path matches nginx config
No match for argument: fping Enable EPEL (section 2), then dnf -y install fping --enablerepo=epel
configure: error: Invalid OPENIPMI directory - unable to find ipmiif.h Enable CodeReady Builder (section 3.3), then dnf -y install OpenIPMI-devel
fatal error: boost/circular_buffer.hpp: No such file or directory Install Boost headers: dnf -y install boost-devel
No match for argument: OpenIPMI-devel / unixODBC-devel Enable ol10_codeready_builder (section 3.3)
SELinux blocks PHP/nginx If SELinux is enforcing, check audit.log and adjust file contexts / booleans for web root and php-fpm sockets.

10. References in this repository

Topic Location
Libraries and dependencies docs/LIBRARIES_AND_DEPENDENCIES.md
PostgreSQL schema database/postgresql/schema.sql, images.sql, data.sql (import in that order)
ClickHouse schema database/clickhouse/schema.sql
ClickHouse log tuning (appliance) build/appliance/run/ansible/roles/clickhouse/files/config.d/
Ansible production install build/appliance/run/ansible/glaber.yaml
UI development ui/src/readme_en.md
Server config example conf/zabbix_server.conf