How to Install Elasticsearch on Ubuntu 20.04

Estimated reading: 2 minutes 0 views

What is Elasticsearch?

Elasticsearch is an open source, RESTful, distributed search and analytics engine, built on top of Apache Lucene. Since its release in 2010, Elasticsearch has rapidly become the most popular and widely used search engine for use cases related to log analysis, full-text search, security information, and more. confidentiality, business analysis and operational information.

When to use Elasticsearch?

We should use Elasticsearch in the following cases

  • Searching for pure text (textual search): regular text search.
  • Searching text and structured data (product search by name + properties): search for text and structured data.
  • Data aggregation, security analytics, analysis of business data: data aggregation, security analysis, business data analysis, large data storage.
  • Logging and log analytics: record the activity and analyze it.
  • Application performance monitoring: monitor application performance.
  • Infrastructure indicators and container monitoring.
  • Geo Search: search by coordinates, analyze and visualize geospatial data.
  • JSON document storage: stores data in JSON format.

How does Elasticsearch work?

You can submit data as JSON documents to Elasticsearch using APIs or collection tools such as Logstash and Amazon Kinesis Firehose. Elasticsearch automatically caches the plaintext and adds a searchable reference to the text at the cluster’s index. You can then find and retrieve the text using the Elasticsearch API. You can also use Kibana, an open source visualization tool, with Elasticsearch to visualize data and build interactive dashboards.
And in this article, I will guide you to install Elasticsearch on Ubuntu 20.04 as follows.
Switch to the directory where you can download the temporary file.

cd /opt

Download Package Elasticsearch
In this article, I installed Elasticsearch version 7.14.1 which is also the latest version.

Screenshot 2021 09 08 at 09.19.41

After downloading run the following command to install.

dpkg -i elasticsearch-*.deb
Screenshot 2021 09 08 at 09.19.55

Launch and Activation

systemctl start elasticsearch
systemctl enable elasticsearch

Check status

systemctl status elasticsearch
Screenshot 2021 09 08 at 09.19.55

Enable Remote Access Elasticsearch

nano /etc/elasticsearch/elasticsearch.yml

Move to line 56 proceed to remove  # this line and edit it to the content below, and remove the  # line 74 to

At this point you can verify that Elasticsearch is running by sending an HTTP request to port 9200 on localhost using the command
curl -X GET "localhost:9200/"

Screenshot 2021 09 08 at 09.25.41

With just the above steps, you have completed installing Elasticsearch on Ubuntu 20.04. Hope the article is useful to you and wish you a successful installation.

Support 24/24h with coupon code: 1DOLLAROFF 10% discount. Click now! 👆

Leave a Comment