Install ElasticSearch

Elasticsearch seems to be a real-time decentralized full-text search as well as an analytics engine that is free software. And is used in projects involving Single Page Applications (SPAs). Elasticsearch is really an open source project written in Java which is used by many large organizations all over the world. It is released under the Apache License 2.0.

In this tutorial, you will learn the general features of Elasticsearch and how to install the elasticsearch step by step.

                       Become a Elasticsearch Certified professional  by learning Elasticsearch online course from hkrtrainings! 

Elasticsearch key features:

The following are the curated features of elasticsearch. They are:

  • Elasticsearch can handle unstructured data up to petabytes in size.
  • Elasticsearch can be used to replace document stores such as MongoDB and RavenDB.
  • Denormalization is used by Elasticsearch to improve search performance.
  • Elasticsearch is a popular enterprise search engine that is currently used by many large organizations such as Wikipedia, The Guardian, StackOverflow, GitHub, and others.
  • Elasticsearch is open source and distributed under the Apache License 2.0. 

Now we will learn about the installation of elasticsearch step by step.

Installation of Elasticsearch:

Step1: Explore the version of Java that is installed on your computer. Java 7 or higher is required. You can double-check by doing the following:

In the Windows Operating System (OS) (via the command prompt)

>java-version

In UNIX OS (Using Terminal) −

$ echo $JAVA_HOME

Step2: Download Elasticsearch from www.elastic.co, as indicated below, depending on your operating system.

  • Download the ZIP file for Windows.
  • Download the TAR file for UNIX OS.
  • Download the DEB file for Debian OS.
  • Download the RPN file for Red Hat and other Linux distributions.
  • In many Linux distributions, the APT and Yum utilities can also be used to install Elasticsearch.

Step3:

Elasticsearch installation is straightforward, as described below for various operating systems.Windows Operating System Elasticsearch is installed after unzipping the zip package.UNIX Operating System Elasticsearch is installed after extracting the tar file to any location.

$wget

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch7.0.0-linux-x86_64.tar.gz

$tar -xzf elasticsearch-7.0.0-linux-x86_64.tar.gz

  • Use the APT utility for Linux OS− Download and install the Public Signing Key

$ wget -qo - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo

apt-key add -

Save the repository definition as shown below −

$ echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" |

sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

  • Perform run update function using the below command.

$ sudo apt-get update

                                                                                                      Get ahead in your career with our Elasticsearch Tutorial  !

ElasticSearch Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

Now you need to install by using the following command −

$ sudo apt-get install elasticsearch

  • Now download and install the Debian package manually using the command given here −

$wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch7.0.0-amd64.deb

$sudo dpkg -i elasticsearch-7.0.0-amd64.deb0

  • Using YUM utility for Debian Linux OS

Download and install the Public Signing Key −

$ rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

  • ADD the following text in the file with the .repo suffix in your “/etc/yum.repos.d/” directory. For example, elasticsearch.repo

elasticsearch-7.x]

name=Elasticsearch repository for 7.x packages

baseurl=https://artifacts.elastic.co/packages/7.x/yum

gpgcheck=1

gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch

enabled=1

autorefresh=1

type=rpm-md

  • Now you can now install Elasticsearch by using the following command

sudo yum install elasticsearch

Step4: Navigate to the bin folder in the Elasticsearch home directory. In the case of Windows, run the elasticsearch.bat file, or in the case of UNIX, use command prompt and terminal to run the Elasticsearch file.

In Windows

> cd elasticsearch-2.1.0/bin

> elasticsearch

Subscribe to our youtube channel to get new updates..!

In Linux

$ cd elasticsearch-2.1.0/bin

$ ./elasticsearch

Step5: The default port for the Elasticsearch web interface is 9200, but this can be changed by changing http.port in the elasticsearch.yml file located in the bin directory. To see if the server is up and running, go to http://localhost:9200. It will return a JSON object containing information about the installed Elasticsearch in the format shown below.

{

   "name" : "Brain-Child",


   "cluster_name" : "elasticsearch", "version" : {


      "number" : "2.1.0",


      "build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",


      "build_timestamp" : "2015-11-18T22:40:03Z",


      "build_snapshot" : false,


      "lucene_version" : "5.3.1"


   },


   "tagline" : "You Know, for Search"

}

Step6: Now we should install Kibana. Follow the respective code given below for installing on Linux and Windows −

For Installation on Linux −

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.0.0-linuxx86_64.tar.gz

tar -xzf kibana-7.0.0-linux-x86_64.tar.gz

cd kibana-7.0.0-linux-x86_64/

./bin/kibana

For Windows Installation

Kibana for Windows can be downloaded from https://www.elastic.co/products/kibana. When you click the link, you will be taken to the home page, as shown below.

installation_on_windows

Unzip and go to the Kibana home directory in order to run it. 

CD c:\kibana-7.0.0-windows-x86_64

.\bin\kibana.bat

ElasticSearch Training

Weekday / Weekend Batches

Conclusion:

In the above blog post we had explained about the installation steps of elasticsearch both for linux and windows operating system. Had any queries drop them in the comments section to get them resolved.

Related Articles:

Find our upcoming ElasticSearch Training Online Classes

  • Batch starts on 28th Sep 2023, Weekday batch

  • Batch starts on 2nd Oct 2023, Weekday batch

  • Batch starts on 6th Oct 2023, Fast Track batch

Global Promotional Image
 

Categories

Request for more information

Gayathri
Gayathri
Research Analyst
As a senior Technical Content Writer for HKR Trainings, Gayathri has a good comprehension of the present technical innovations, which incorporates perspectives like Business Intelligence and Analytics. She conveys advanced technical ideas precisely and vividly, as conceivable to the target group, guaranteeing that the content is available to clients. She writes qualitative content in the field of Data Warehousing & ETL, Big Data Analytics, and ERP Tools. Connect me on LinkedIn.