Building Zabbix agent - linux-on-ibm-z/docs GitHub Wiki

Building Zabbix agent

Below versions of Zabbix agent are available in respective distributions at the time of creation of these build instructions:

  • RHEL (8.10, 9.6, 9.7, 10.0, 10.1) have 7.0.25
  • SLES 15 SP7 has 6.0.33
  • Ubuntu 22.04 has 5.0.17

The instructions provided below specify the steps to build Zabbix agent version 7.0.25 on Linux on IBM Z for following distributions:

  • SLES 15 SP7
  • Ubuntu (22.04, 24.04)

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 Zabbix agent using manual steps, go to STEP 2.

Use the following commands to build Zabbix agent using the build script. Please make sure you have wget installed.

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Zabbix/7.0.25/build_zabbixagent.sh

# Build zabbix agent
bash build_zabbixagent.sh

2. Install dependencies

export SOURCE_ROOT=/<source_root>/
  • SLES 15 SP7

    sudo zypper install -y tar wget make gcc awk pcre2-devel
    
  • Ubuntu (22.04, 24.04)

    sudo apt-get update
    sudo apt-get -y install tar wget make gcc libpcre2-dev
    

3. Download and install Zabbix agent

  • Download Zabbix agent

    cd $SOURCE_ROOT
    wget https://cdn.zabbix.com/zabbix/sources/stable/7.0/zabbix-7.0.25.tar.gz
    tar -xzf zabbix-7.0.25.tar.gz
    
  • Install Zabbix agent

    cd $SOURCE_ROOT/zabbix-7.0.25
    export CFLAGS="-std=gnu99"
    ./configure --enable-agent --with-libpcre2
    make
    sudo make install
    

4. Start Zabbix agent (Optional)

Follow the official guide given here to verify the installation.

References: