How to Install Logstash on Debian 11

Install Logstash on Debian 11

In this article, we will have explained the necessary steps to install Logstash on Debian 11. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Logstash is a logs processing pipeline that transports logs from multiple sources simultaneously, transforms them, and then sends them to a “stash” like Elasticsearch. Nowadays Logstash is one of the most efficient and required data processing pipelines which is usually used with Elasticsearch.

Install Logstash on Debian 11

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

sudo apt update
sudo apt upgradesudoapt install software-properties-common wgetsudoapt installapt-transport-https

Step 2. Install Java.

In order to install Logstash, you will need to install Java in your system. You can install the Java JDK with the following command:

sudo apt install openjdk-11-jdk

Check the version of your Java installed:

java -version

Step 3. Install Logstash on Debian Bullseye system.

First, you need to import the signing key and add the repository:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudoapt-key add -echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

Then, update the repository and install Logstash to your system using the following command:

sudo apt update
sudo apt install logstash

That’s all you need to do to install Logstash on Debian (Bullseye). I hope you find this quick tip helpful. For further reading Logstash on Debian’s system, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.