Installing Logstash on Debian Latest
This tutorial will guide you through the process of installing Logstash from the official Elastic website on Debian system.
Prerequisites
A Debian system with root user access.
Java 8 or later version installed on your system. You can check the installed version by running the following command:
java -version
Download and Install Logstash
Download the latest version of Logstash using the below command:
wget https://artifacts.elastic.co/downloads/logstash/logstash-{version}.tar.gzReplace
{version}with the actual version that you want to install.Extract the downloaded file using the below command:
tar -xzf logstash-{version}.tar.gzMove the extracted Logstash folder to
/usr/sharedirectory, which is the default directory for installing Elasticsearch packages.mv logstash-{version} /usr/share/logstashCreate a symbolic link to the Logstash binary file, which makes it easier to access Logstash from anywhere in the system.
ln -s /usr/share/logstash/bin/logstash /usr/bin/logstash
Start and Stop Logstash Service
Start Logstash service using the below command:
systemctl start logstashVerify that Logstash is running using the command:
systemctl status logstashThis command will output the status of the Logstash service, including whether it's currently active or not.
To stop Logstash service, use the below command:
systemctl stop logstash
Conclusion
In this tutorial, we have installed Logstash on the Debian system from the official Elastic website. You can now use Logstash for ingesting and processing your log data.