RHEL / Rocky Linux with TSDB built from source

Follow this installation guide if you cannot install the TimescaleDB extension from binary packages because they are not available for your OS version or you do not have access to the TimescaleDB repository.

Do NOT install TimescaleDB extension from EPEL repository.
This version is missing some key features required by XorMon.

Overview of XorMon requirements:
  • Node.js 20
  • PostgreSQL 16
  • TimescaleDB Community Edition (latest)
Prerequisites
  • HW sizing
  • supported Linux OS
  • access to internet repositories
  • 5 GB of free space in the "/home" filesystem for the application
  • enough free space in the "/var" filesystem for the data (see Sizing)
Host OS installation procedure
  • Disable SELinux (as root)

    • one-liner
      sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
    • edit manually
      vi /etc/selinux/config
      SELINUX=disabled

    Reboot
    reboot

  • Create xormon user (as root)
    adduser xormon
    passwd xormon
  • Increase user system limits (as root)
    vi /etc/security/limits.conf
    Append following lines before the end of the file
    xormon          hard    stack           -1
    xormon          soft    stack           -1
    xormon          hard    data            -1
    xormon          soft    data            -1
    xormon          hard    nofile          32768
    xormon          soft    nofile          32768
    xormon          hard    nproc           64000
    xormon          soft    nproc           64000
  • Install required packages (as root)

    • Enable CodeReady Builder (RHEL) or PowerTools (Rocky Linux) repository

      RHEL 8.x
      subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
      RHEL 9.x
      subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
      Rocky Linux 8.x
      dnf config-manager --set-enabled powertools
      Rocky Linux 9.x
      dnf config-manager --enable crb
    • Install packages
      dnf install perl ed libxml2 epel-release wget curl gnupg net-tools sblim-wbemcli libaio wget curl strace 
      dnf install perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-Env perl-CGI perl-Data-Dumper
      dnf install perl-LWP-Protocol-https perl-libwww-perl perl-Time-HiRes perl-IO-Tty openldap-clients perl-Time-Piece 
      dnf install perl-JSON perl-JSON-PP perl-JSON-XS net-snmp-perl net-snmp-utils
      dnf install libjpeg-devel zlib-devel libpng-devel libjpeg-turbo-devel libjpeg-turbo-utils
      dnf install perl-DBI perl-DBD-ODBC unixODBC unixODBC-devel freetds perl-DBD-Pg
      • RHEL / Rocky Linux 8.x only
        dnf install perl-Net-INET6Glue
      • RHEL / Rocky Linux 9.x only
        dnf install perl-FindBin
    • Python

      Required only for prediction graphs
      You can run XorMon without it if you have trouble downloading necessary Python modules
      dnf install -y python3-virtualenv python3-pip libpq-devel python3-devel gcc-c++ gcc

  • Install Java 11

    Required only by Hitachi Export Tool for Hitachi VSP monitoring.
    Skip if you don't need to monitor Hitachi VSP storage systems.
    dnf install -y java-11-openjdk-headless
  • Install Node.js (as root)

  • Install PostreSQL 16 (as root)

    • Enable PostgreSQL 16 module
      dnf module enable postgresql:16
      dnf module switch-to postgresql:16
    • Remove 'libpq-devel'
      dnf remove libpq-devel
    • Install PostgreSQL 16
      dnf install postgresql postgresql-contrib postgresql-server postgresql-server-devel
  • Build TimescaleDB extension from source (as root)

    • Install prerequisite packages
      dnf install git cmake gcc
    • Clone TimescaleDB source code
      cd ~
      git clone https://github.com/timescale/timescaledb
      cd timescaledb/
      git checkout 2.23.0
    • Build and install TimescaleDB
      cd ~/timescaledb/
      ./bootstrap
      cd ./build && make
      make install
  • Initialize and configure PostgreSQL

    • Initialize DB
      postgresql-setup initdb
      systemctl enable --now postgresql
      systemctl stop postgresql
    • Configure
      sed -i "s/^#shared_preload_libraries =.*/shared_preload_libraries = 'timescaledb'/g" /var/lib/pgsql/data/postgresql.conf
      sed -i 's/ident$/scram-sha-256/g' /var/lib/pgsql/data/pg_hba.conf
      sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /var/lib/pgsql/data/postgresql.conf
    • Start PostgreSQL
      systemctl start postgresql
    • Set password for user postgres
      sudo -u postgres psql
      
      postgres=# \password postgres
      postgres=# ALTER USER postgres VALID UNTIL 'infinity';
      postgres=# \q
      Make note of the password. It will be needed later during XorMon installation.

  • Configure firewall (optional, as root)

    Open XorMon port in the firewall 8443 TCP (XorMon UI) and 8162 TCP (OS agent communication).
    firewall-cmd --zone=public --add-port=8443/tcp --permanent
    firewall-cmd --zone=public --add-port=8162/tcp --permanent
    firewall-cmd --reload
    firewall-cmd --list-port

  • Follow XorMon application install