Big Data 6 min read

How to Install and Configure Elasticsearch and Kibana for ELK Stack

This guide walks you through downloading, extracting, and starting Elasticsearch, linking it with Logstash, then installing and configuring Kibana, including setting host IP, connecting to Elasticsearch, and accessing the Kibana UI to visualize logs on a Linux server.

Java Backend Technology
Java Backend Technology
Java Backend Technology
How to Install and Configure Elasticsearch and Kibana for ELK Stack

Introduction

Elasticsearch is a highly scalable open‑source full‑text search and analytics engine that stores, searches, and analyzes large volumes of data in near real‑time. Kibana provides a web‑based graphical interface for visualizing and exploring data stored in Elasticsearch.

Elasticsearch Installation

1. Download and extract Elasticsearch

Download URL: https://www.elastic.co/downloads/elasticsearch

Use the following command to download the package:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.1.tar.gz

Extract the archive: tar -xvf elasticsearch-5.2.1.tar.gz Enter the extracted directory and start Elasticsearch:

./elasticsearch

If no error messages appear, Elasticsearch has started successfully.

Link Logstash with Elasticsearch

Modify the logstash.conf file from the previous tutorial to set the output to Elasticsearch and add two filter plugins (details omitted). Save the file.

Start Filebeat:

/filebeat -e -c filebeat.yml -d "publish"

Start Logstash:

bin/logstash -f logstash.conf

Verify Elasticsearch response (screenshot omitted).

Kibana Installation and Usage

1. Download and extract Kibana

Download URL: https://www.elastic.co/downloads/kibana

Download with wget and extract:

tar -xvf kibana-5.2.1-linux-x86_64.tar.gz

2. Configure Kibana

Edit config/kibana.yml:

Set server.host: 0.0.0.0 to bind to all interfaces.

Set elasticsearch.url: "http://localhost:9200" to connect to the local Elasticsearch instance.

3. Start Kibana

Run the following command in the bin directory:

./kibana

Kibana listens on port 5601. Access it via a browser at http://192.168.1.220:5601 .

After logging in, create an index pattern to view logs generated by your applications (e.g., Tomcat). If no logs appear, ensure the application is producing logs.

Conclusion

The tutorial demonstrates a complete, minimal setup of the ELK stack on a Linux server: installing Elasticsearch, linking it with Logstash, installing and configuring Kibana, and visualizing logs through the Kibana UI.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ElasticsearchTutorialELKLogstashKibanaFilebeat
Java Backend Technology
Written by

Java Backend Technology

Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.