Thursday, 24 September 2015

Installing Elastic Search

Java is prerequisite for Elastic search. Make sure you install Java in your machine.

Step 1: Download latest version of elastic search from following location.

Step 2: Extract the zip folder. After extracting you can see bin, config, lib directories. Add bin directory to your system path.


If you are using windows run elasticsearch.bat, if you are using Linux environment, open terminal and run ‘elastisearch’.
$ elasticsearch
[2015-08-27 09:48:12,344][INFO ][node                     ] [Adrian Corbo] version[1.7.1], pid[44945], build[b88f43f/2015-07-29T09:54:16Z]
[2015-08-27 09:48:12,344][INFO ][node                     ] [Adrian Corbo] initializing ...
[2015-08-27 09:48:12,401][INFO ][plugins                  ] [Adrian Corbo] loaded [], sites []
[2015-08-27 09:48:12,433][INFO ][env                      ] [Adrian Corbo] using [1] data paths, mounts [[/ (/dev/disk0s2)]], net usable_space [382.5gb], net total_space [465.1gb], types [hfs]
[2015-08-27 09:48:14,195][INFO ][node                     ] [Adrian Corbo] initialized
[2015-08-27 09:48:14,195][INFO ][node                     ] [Adrian Corbo] starting ...
[2015-08-27 09:48:14,258][INFO ][transport                ] [Adrian Corbo] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.19.34.41:9300]}
[2015-08-27 09:48:14,273][INFO ][discovery                ] [Adrian Corbo] elasticsearch/RlHFZNb9SayDRwyqmp4tJA
[2015-08-27 09:48:18,040][INFO ][cluster.service          ] [Adrian Corbo] new_master [Adrian Corbo][RlHFZNb9SayDRwyqmp4tJA][localhost][inet[/10.19.34.41:9300]], reason: zen-disco-join (elected_as_master)
[2015-08-27 09:48:18,055][INFO ][http                     ] [Adrian Corbo] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.19.34.41:9200]}
[2015-08-27 09:48:18,055][INFO ][node                     ] [Adrian Corbo] started
[2015-08-27 09:48:18,067][INFO ][gateway                  ] [Adrian Corbo] recovered [0] indices into cluster_state

Open any browser and hit url http://localhost:9200/. You will see following kind of output.
{
  "status" : 200,
  "name" : "Adrian Corbo",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.7.1",
    "build_hash" : "b88f43fc40b0bcd7f173a1f9ee2e97816de80b19",
    "build_timestamp" : "2015-07-29T09:54:16Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}


That’s it we are done setting up elastic search.

Note
Use –d option to run elastic search in background (elasticsearch -d).




Prevoius                                                 Next                                                 Home

No comments:

Post a Comment