Advance

Tutorial Install Elasticsearch on Ubuntu 21.04 | 20.04

Tutorial Install Elasticsearch on Ubuntu 21.04

Elasticsearch is a full-featured open-source search engine developed in Java. Takes unstructured data from various sources and stores it in a complex format that is highly optimized for text search. In this article, we are going to teach you How to Install Elasticsearch on Ubuntu 21.04. You can visit the packages available in Eldernode if you wish to purchase an Ubuntu VPS server.

How to Install Elasticsearch on Ubuntu 21.04

Recommended Article: Install ClamAV antivirus on Linux Ubuntu

What is Elasticsearch?

Elasticsearch is a product of a company called Elastic, which was founded in 2012. Elasticsearch uses Lucene Apache at its core for indexing and searching. Lucene is a library that is really complicated to work with; But don’t worry, Elasticsearch eliminates all the hassle by providing API usability.

Using Elasticsearch, large volumes of data can be stored and analyzed quickly and efficiently. This is especially useful when dealing with semi-structured natural language data.

Elasticsearch scalability and speed are high and can be used for:

_ Search the app

_ Website Search

_ Organizational search

_ Analysis of input information

_ Check program performance

_ Analysis and visualization of data

_ Security analysis

_ Business analysis

Prerequisites to Install Elasticsearch on Ubuntu 21.04

In this section, we want to show you the prerequisites to install Elasticsearch on Ubuntu 21.04. To do this, just follow the steps below.

You need to update the packages index. Then you need to install OpenJDK 8:

apt update
apt install openjdk-8-jdk

You can now check the JAVA status using the following command:

java -version

Install Elasticsearch on Ubuntu 21.04 | Ubuntu 20.04

Now we want to teach you how to install Elasticsearch on Ubuntu 21.04. Just follow the steps below correctly and in order.

The first step is to import the GPG key for Elasticsearch packages using the following command:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -

Then you need to add Elasticsearch repository to the system using the following command:

sh -c 'echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" > /etc/apt/sources.list.d/elastic-6.x.list'

After completing the above steps, you must first update the cache using the following commands. Then install Elasticsearch packages on the system:

apt update
apt install elasticsearch

Finally, you can use the following commands Start and enable the Elasticsearch service:

systemctl start elasticsearch.service
systemctl enable elasticsearch.service

How to Configure Elasticsearch on Ubuntu 21.04 | Ubuntu 20.04

In this section, we want to examine the Elasticsearch configuration. To do this, just open the configuration file using one of the text editors you want:

vi /etc/elasticsearch/elasticsearch.yml

Now you need to look in the linear configuration file that contains network.host. Then uncomment it and change its value to 0.0.0.0. Note that at this point you need to set the network host to 0.0.0.0. To do this, use the following command:

network.host: 0.0.0.0

The interesting thing to know is that if you want this configuration on your device to be private or local, you have to set network.host to 127.0.0.1.

After you have made the said changes to the configuration file, you can now save the file and exit it. Now you need to restart Elasticsearch using the following command to apply the changes:

systemctl restart elasticsearch
Recommended Article: How to install Linux Bash on Windows 10

Conclusion

There are many benefits to using Elasticsearch. These benefits include scalability, speed, Elasticsearch API‌ use, multilanguage, document optimization, autocomplete, and free schema. In this article, we tried to teach you step by step how to install Elasticsearch on Ubuntu 21.04.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave Your Comment

Your email address will not be published.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+18054214518

7 days a week, 24 hours a day