How to Install Elasticsearch on Debian 10

Install Elasticsearch on Debian 10

In this article, we will have explained the necessary steps to install and setup Elasticsearch on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Elasticsearch is a versatile and highly effective open source, distributed real-time search and analytics engine. Utilizing a easy set of APIs, it offers the flexibility for full-text search. Elastic search is freely available under the Apache 2 license, which offers probably the most flexibility.

Install Elasticsearch on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Java.

Elasticsearch is a Java application, so the first step is to install Java. Run following commands to install Java:

Verify the Java installation:

Step 3. Install Elasticsearch.

Use Elasticsearch official apt repository to install Elasticsearch on Debian Linux system:

Add the Elasticsearch repository to the system by running:

After adding the repository to your system. Run the following commands to update cache and then install Elasticsearch packages on your system:

Once the installation is done, you can start elasticsearch service by executing:

Step 4. Configure Elasticsearch.

You can customize this by editing the Elasticsearch configuration file. Edit configuration file in your favorite text editor and update the following values:

Change the following values:

Restart the Elasticsearch service for the changes to take effect:

Step 5. Verify Elasticsearch Setup.

You can verify that Elasticsearch is running by sending an HTTP request to port 9200 on localhost with the following curl command:

You should see something similar to this:

Congratulation, you have learned how to install and configure Elasticsearch on Debian Buster. If you have any question, please leave a comment below.