How To Install ELK Stack on Debian 9

Install ELK Stack on Debian 9

In this tutorial we will show you how to install ELK Stack on Debian 9. For those of you who didn’t know, ELK stack is a popular, open source log management platform. It is used as a centralized management for storing, analyzing and viewing of logs. Centralized management makes it easier to study the logs and identify issues if any for any number of servers.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation ELK Stack on a Debian 9 (Stretch) server.

Install ELK Stack on Debian 9 Stretch

Step 1. Before we install any software, it’s important to make sure your system is up to date by running these following apt-get commands in the terminal:

Step 2. Installing Java.

Elasticsearch requires at least Java 8 in order to run, You can install OpenJDK package that includes JRE:

Verify the Java version:

Step 3. Installing Elasticsearch on Debian 9.

First, install Elasticsearch using the apt package manager from the official Elastic repository:

Then, install Elasticsearch with apt using the following command:

Start the Elasticsearch service and set it to automatically start on boot:

Now run the following command from the terminal to check if the elasticsearch is working properly:

You should get the following output:

Step 4. Installing Kibana on Debian 9.

First, install the latest version of Kibana using the apt package manager from the official Elastic repository:

Once the installation is completed, open the kibana.yml file and restrict the remote access to the Kibana instance:

Start the Kibana service and set it to start automatically on boot:

Step 5. Install and configure Nginx as a reverse proxy.

Next, use Nginx as a reverse proxy to access Kibana from the public IP address. To install Nginx, run:

Create a basic authentication file with the openssl command:

Then, create a virtual host configuration file for the Kibana instance:

Creating a symbolic link and test the Nginx configuration:

Restart the Nginx service and set it to start automatically on boot:

Step 6. Installing Logstash on Debian 9.

Install Logstash using the apt package manager from the official Elastic repository:

Once the Logstash package is installed start the Logstash service and set it to start automatically on boot:

Step 7. Accessing Kibana.

You can now access the kibana interface by opening your browser and typing:

Congratulation’s! You have successfully installed Skype. Thanks for using this tutorial for installing ELK (Elasticsearch, Logstash and Kibana) on Debian 9 Stretch system. For additional help or useful information, we recommend you to check the official ELK Stack on web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!