Introduction.
The Elastic Stack (formerly known as the ELK Stack) is a set of tools commonly used for searching, analyzing, and visualizing large amounts of data in real-time. It consists of three components: Elasticsearch, Logstash, and Kibana. In this blog, we’ll walk you through the steps to install and configure the Elastic Stack on an Ubuntu 22.04 server.
Elastic Search.
Elasticsearch is a distributed, RESTful search and analytics engine designed for handling large amounts of data quickly and efficiently. It is commonly used for full-text search, logging, and real-time analytics. Elasticsearch is built on top of Apache Lucene and is the core component of the Elastic Stack (often referred to as the ELK Stack, which includes Elasticsearch, Logstash, and Kibana).
Logstash.
Logstash is an open-source data processing pipeline that helps you collect, transform, and transport data from various sources to different destinations. It is part of the Elastic Stack (formerly known as the ELK Stack), which also includes Elasticsearch and Kibana. Logstash is particularly useful for processing logs and event data, although it can handle a wide range of data formats and use cases.
Kibana.
Kibana is an open-source data visualization and exploration tool that is part of the Elastic Stack (formerly the ELK Stack, which includes Elasticsearch, Logstash, and Kibana). Kibana allows users to visualize, explore, and analyze data stored in Elasticsearch in an interactive, intuitive way. It is often used to display logs, metrics, and other types of data collected and indexed by Elasticsearch.
Prerequisites
Before we begin, make sure your system meets the following prerequisites:
- Ubuntu 22.04 server.
- At least 4 GB of RAM and 20 GB of free disk space.
- A non-root user with sudo privileges.
- An active internet connection.
TASK 1: Install Java And Nignx.
STEP 1: Install java using following commands.
sudo apt update
sudo apt install default-jdk
java -version



STEP 2: Nginx installed Using the below command.
sudo apt update
sudo apt install nginx
sudo ufw app list
sudo ufw allow 'Nginx HTTP'
sudo ufw status
systemctl status nginx

TASK 2: Install ElasticSearch.
STEP 1: Install elastic search using the following command.
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch |sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt update
sudo apt install elasticsearch


STEP 2: configuration file, elasticsearch.yml.
sudo nano /etc/elasticsearch/elasticsearch.yml
STEP 3: Edit the Network host : Local Host.
- Save the file.


STEP 4: Start the elasticsearch.
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch
curl -X GET "localhost:9200"

TASK 3: Install logstash.
STEP 1: Install loogstash package, Using the following command.
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic-keyring.gpg
sudo apt-get install apt-transport-https
echo "deb [signed-by=/usr/share/keyrings/elastic-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list


STEP 2: Enter the command.
sudo apt-get update
sudo apt-get install logstash

STEP 3: Start the logstash.
sudo systemctl start logstash
sudo systemctl enable logstash
sudo systemctl enable logstash

TASK 4: Install Kibana.
STEP 1: Enter the following command.
sudo apt install kibana
sudo systemctl enable kibana
sudo systemctl start kibana


Conclusion.
Congratulations! You have successfully installed the Elastic Stack (Elasticsearch, Logstash, and Kibana) on your Ubuntu 22.04 server. You can now start ingesting, processing, and visualizing data in real time. With the flexibility and power of the Elastic Stack, you’ll be able to build robust data processing pipelines and create insightful visualizations for your data.
Add a Comment