Install Elasticsearch on Ubuntu 18.04 /16.04 LTS

Ubuntu

Elasticsearch is a flexible and powerful open source, distributed real-time search and analytics engine. Using a simple set of APIs, it provides the ability for full-text search. Elastic search is freely available under the Apache 2 license, which provides the most flexibility.

This tutorial will help you to install Elasticsearch on Ubuntu 18.04 & 16.04 LTS system.

Step 1 – Prerequsities

Login to your Ubuntu system using sudo privileges. For the remote Ubuntu server using ssh to access it. Windows users can use putty or alternatives to log in to Ubuntu system.

Elasticsearch required Java to run on any system. Make sure your system has Java installed by running following command. This command will show you current Java version.

 

Step 2 – Install Elasticsearch on Ubuntu

The Elasticsearch official team provides an apt repository to install Elasticsearch on Ubuntu Linux system. After install below package and import GPG key for Elasticsearch packages.

 

Then configure the apt repository on your Debian system. The below command will add a repository to install latest Elasticsearch 6.X on your Ubuntu system.

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

Step 3 – Configure Elasticsearch

The Elasticsearch has been installed on your system. You can customize this by editing Elasticsearch configuration file. Edit configuration file in your favorite text editor and update it:

Change the following values:

Step 4 – Launch Elasticsearch

To configure Elasticsearch to start automatically when the system boots up, run the following commands:

Elasticsearch can be started and stopped as follows:

Step 5 – Test Setup

The Elasticsearch service is ready to use. You can test it using curl command line utility. Run the simple GET command using curl to verify the setup. You will see the Elasticsearch cluster details with the version on your screen.

Console Output

Source

Share: