Building Fluentd - linux-on-ibm-z/docs GitHub Wiki

Building Fluentd

The instructions provided below specify the steps to build Fluentd 1.19.3 on Linux on IBM Z for the following distributions:

  • RHEL (8.10, 9.6, 9.7, 9.8, 10.0, 10.1, 10.2)
  • SLES (15 SP7, 16)
  • 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 and Install Fluentd

1.1. Build using script

If you want to build fluentd using manual steps, go to STEP 1.2.

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

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Fluentd/1.19.3/build_fluentd.sh

# Build fluentd
bash build_fluentd.sh

If the build completes successfully, go to STEP 2. In case of error, check logs for more details or go to STEP 1.2 to follow manual build steps.

1.2. Install dependencies

export SOURCE_ROOT=/<source_root>/
  • RHEL 8.10

    sudo yum install wget 
    
  • RHEL (9.6, 9.7, 9.8, 10.0, 10.1, 10.2)

    sudo yum install -y rpmdevtools zlib-devel zlib wget
    
  • SLES (15 SP7, 16)

    sudo zypper install -y gzip awk zlib-devel wget
    
  • Ubuntu (22.04, 24.04)

    sudo apt update && sudo apt install -y zlib1g-dev wget
    
  • Build Ruby

    wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Ruby/4.0.5/build_ruby.sh
    bash build_ruby.sh -y
    

1.3. Setup the GEM_HOME and PATH environment for a standard user (For RHEL)

export GEM_HOME=${HOME}/.gem/ruby
export PATH=${HOME}/.gem/ruby/bin:$PATH

1.4. Build and install the latest stable fluentd gem and dependencies

Fluentd is a gem based product, so the rubygem install process will automatically build the necessary native parts

  • RHEL

    gem install fluentd -v 1.19.3
    
  • SLES and Ubuntu

    sudo gem install fluentd -v 1.19.3
    

Once complete it should report that a number of gems including fluentd are installed. Verify the installed version with gem list fluentd

2. Testing (Optional)

Please refer to Get started with the fluentd for basic validation test.

References: