Building Logstash - linux-on-ibm-z/docs GitHub Wiki
Building Logstash
The instructions provided below specify the steps to build Logstash version 9.4.2 on Linux on IBM Z for following distributions:
- RHEL (8.10, 9.6, 9.7)
- 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 Logstash using manual steps, go to STEP 2. Use the following commands to build Logstash using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Logstash/9.4.2/build_logstash.sh
# Build Logstash
bash build_logstash.sh [Provide -j (Temurin21|OpenJDK21) option for building with specific java]
If the build completes successfully, go to STEP 6. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.
2. Install dependencies
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.10, 9.6, 9.7)
sudo yum install -y curl ant gcc make tar wget -
SLES (15 SP7)
sudo zypper install -y curl ant gawk gcc make tar wget -
Ubuntu (22.04, 24.04)
sudo apt-get update sudo apt-get install -y gzip make tar curl wget
3. Install Java
-
With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)
- Download and install Eclipse Adoptium Temurin Runtime (Java 21) from here.
-
With OpenJDK 21
- RHEL (8.10, 9.6, 9.7)
sudo yum install -y java-21-openjdk-devel - SLES (15 SP7)
sudo zypper install -y java-21-openjdk java-21-openjdk-devel - Ubuntu (22.04, 24.04)
sudo apt-get install -y openjdk-21-jre openjdk-21-jdk
- RHEL (8.10, 9.6, 9.7)
Note: Eclipse Adoptium Temurin Runtime Version jdk-21.0.11+10, OpenJDK 21 were used for verifying these instructions.
4. Set the environment variables for Java
export LS_JAVA_HOME=/<Path to JDK>/
export PATH=$LS_JAVA_HOME/bin:$PATH
5. Download and Install Logstash
cd $SOURCE_ROOT
wget https://artifacts.elastic.co/downloads/logstash/logstash-oss-9.4.2-linux-aarch64.tar.gz
sudo mkdir -p /usr/share/logstash
sudo tar -xzf logstash-oss-9.4.2-linux-aarch64.tar.gz -C /usr/share/logstash --strip-components 1
6. Verify (Optional)
Follow the official guide given here to verify the installation.