Don’t stop now! The next scenario will only take about 10 minutes to complete.

Logstash | 1 | Installation

Installation

Install Java8

apt install gcj-4.8-jre-headless openjdk-8-jre-headless -y

Set Java Home variable

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

Logstash Installation

Download and install the public signing key

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Add the logstash repository

echo deb https://artifacts.elastic.co/packages/5.x/apt stable main | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list

Install Logstash

sudo apt-get update && sudo apt-get install logstash

Manually register Logstash as a service

/usr/share/logstash/bin/system-install /etc/logstash/startup.options sysv

Start Logstash as a service

sudo systemctl start logstash.service