How to Install ELK Stack (Elasticsearch, Logstash, Kibana) on Ubuntu 20.04


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing ELK Stack (Elasticsearch, Logstash, Kibana) on Ubuntu 20.04

ELK Stack is a powerful open-source software stack used for collecting, storing, and visualizing data in real-time. It is widely used for centralized log management and analysis, allowing users to gain insights from large volumes of data across multiple sources.

To install ELK Stack on Ubuntu 20.04, follow the steps below:

Step 1: Install Java

ELK Stack requires Java to run. Install Java OpenJDK by running the following command:

sudo apt update
sudo apt install openjdk-8-jdk

Step 2: Install Elasticsearch

Elasticsearch is a distributed search and analytics engine. Run the following commands to install Elasticsearch:

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

Step 3: Configure Elasticsearch

Edit the Elasticsearch configuration file using the following command:

sudo nano /etc/elasticsearch/elasticsearch.yml

Uncomment the line that sets the network host to localhost:

network.host: localhost

Save and close the file, then start and enable Elasticsearch service:

sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch

Step 4: Install Logstash

Logstash is an open-source server-side data processing pipeline that ingests data from multiple sources. Install Logstash using the following commands:

sudo apt-get install logstash

Step 5: Configure Logstash

Create a Logstash configuration file:

sudo nano /etc/logstash/conf.d/myconfig.conf

Add input, filter, and output sections to the configuration file to specify the data source, transformation, and destination. Save and close the file.

Step 6: Install Kibana

Kibana is a data visualization dashboard for Elasticsearch. Install Kibana with the following commands:

sudo apt-get install kibana

Step 7: Configure Kibana

Edit the Kibana configuration file:

sudo nano /etc/kibana/kibana.yml

Specify the Elasticsearch URL by uncommenting and setting the following line:

elasticsearch.hosts: ["http://localhost:9200"]

Save and close the file, then start and enable Kibana service:

sudo systemctl start kibana
sudo systemctl enable kibana

Step 8: Access Kibana

Open a web browser and navigate to http://localhost:5601 to access the Kibana dashboard.

You have now successfully installed ELK Stack on Ubuntu 20.04. You can start ingesting and analyzing your data using the powerful features provided by Elasticsearch, Logstash, and Kibana.

Installing ELK Stack
Ubuntu 20.04
ELK Stack installation
Elasticsearch installation
Logstash installation
Kibana installation
Ubuntu 20.04 installation
ELK Stack setup.

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.