Install Elasticsearch - elasticsearch - elasticsearch tutorial - elastic search



Elasticsearch Installation

  • Elasticsearch requires at least Java 8. Specifically, as of this writing, it is recommended that you use the Oracle JDK version 1.8.0_131.
  • Java installation varies from platform to platform so we won’t go into those details here. Oracle’s recommended installation documentation can be found on Oracle’s website.
  • Be sufficient to say, before you install Elasticsearch, please check your Java version first by running (and then install/upgrade accordingly if needed):

Steps for installation of Elasticsearch

  • Step 1: Check the minimum version of your java in installed your computer, it should be java 7 or more updated version. You can check by doing the following
  • In Windows Operating System (OS) (using command prompt) −
> java -version
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
  • In UNIX OS (Using Terminal) −
$ echo $JAVA_HOME
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
  • Step 2: Download Elasticsearch from www.elastic.co
    • For windows OS download ZIP file.
    • For UNIX OS download TAR file.
    • For Debian OS download DEB file.
    • For Red Hat and other Linux distributions download RPN file.
    • APT and Yum utilities can also be used to install Elasticsearch in many Linux distributions.
  • Step 3:Installation process for Elasticsearch is very easy and described below for different OS −
    • Windows OS: Unzip the zip package and the Elasticsearch is installed.
    • UNIX OS Extract tar file in any location and the Elasticsearch is installed.
$tar -xvf elasticsearch-2.1.0.tar.gz
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
    • Using APT utility for Linux OS −
      • Download and install the Public Signing Key −
$ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
        • Save the repository definition −
$ echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc
   /apt/sources.list.d/elasticsearch-2.x.list
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
        • Run update −
$ sudo apt-get update
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
        • Now you can install by using the following command −
$ sudo apt-get install elasticsearch
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
  • Using YUM utility for Debian Linux OS −
      • Download and install the Public Signing Key −
$ rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
        • ADD the below text in the file with. repo suffix in your “/etc/yum.repos.d/” directory. For example, elasticsearch.repo
[elasticsearch-2.x]
name = Elasticsearch repository for2.x packages
baseurl = http://packages.elastic.co/elasticsearch/2.x/centos
gpgcheck = 1
gpgkey = http://packages.elastic.co/GPG-KEY-elasticsearch
enabled = 1
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
        • You can now install Elasticsearch by using the following command −
$ yum install elasticsearch
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
  • Step 4: Go to the Elasticsearch home directory and inside the bin folder. Run the elasticsearch.bat file in case of windows or you can do the same using command prompt and through terminal in case of UNIX rum Elasticsearch file.
    • In Windows −
> cd elasticsearch-2.1.0/bin
> elasticsearch
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
    • In Linux −
$ cd elasticsearch-2.1.0/bin
$ ./elasticsearch
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
Note: in case of windows, you might get error stating JAVA_HOME is not set, please set it in environment variables to “C:\Program Files\Java\jre1.8.0_31” or the location where you installed java.
  • Step 5 : Default port for Elasticsearch web interface is 9200 or you can change it by changing http.port inside elasticsearch.yml file present in bin directory. You can check if the server is up and running by browsing http://localhost:9200. It will return a JSON object, which contains the information about the installed Elasticsearch in the following way −
{
   "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"
}
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
  • Step 6: You can install fiddler2 from www.telerik.com as a front end for your Elasticsearch.
  • In the configure window of fiddler2, you can hit the address of Elasticsearch adding an index and if you want, then the type/mapping also using HTTP POST method, for example −
    • Address bar
http://localhost:9200/schools/school
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
      • Request body − You can add JSON object, which will get store into that index.
    • You can use the same for searching anything by just adding “_search” keyword at the end of URL and sent a query in request body for example
      • Address bar
POST http://localhost:9200/city/schools/_search
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
      • Request body
      • { "query":{ "match_all":{} } }
  • This query will return everything from that index, which belongs to that particular type.
  • You can delete a particular index or type by just putting the URL of the same in address bar and hit it with HTTP DELETE method.

This tutorial provides some of the very important topics such as elasticsearch types , elasticsearch 5 , elasticsearch github , elasticsearch ui , elasticsearch wiki , elasticsearch indices , elasticsearch cluster , elasticsearch port , elasticsearch docs , elasticsearch configuration , elasticsearch terms , elasticsearch mapping , elasticsearch head , elasticsearch rest api , elasticsearch filter , elasticsearch search , elastic search query , elasticsearch database , elasticsearch marvel , elasticsearch gui , elasticsearch match , elasticsearch install , elasticsearch query example , elasticsearch api , elasticsearch update , kibana plugins , solr vs elasticsearch , logstash elasticsearch , elasticsearch kibana , elasticsearch vs solr , elasticsearch head plugin , elasticsearch logstash , elasticsearch aws , aws elastic search , elasticsearch php , elasticsearch example , elasticsearch logstash kibana , download elasticsearch , kibana demo , elasticsearch documentation , elasticsearch version , what is elasticsearch , elasticsearch plugin , elasticsearch log , elasticsearch download , elastic co

Related Searches to Install Elasticsearch