05/03/2016 - ELASTICSEARCH, MAC
If you install elasticsearch with classic brew
command, you'll get the latest version. However, if you want to install a specific version then you can follow the steps below.
We're going to install v.1.7.4 in this case. You can find all past releases here.
# Open this URL in browser and download v.1.7.4
https://www.elastic.co/downloads/past-releases/elasticsearch-1-7-4
Assume that you downloaded it into your home directory.
$ cd ~
$ tar -zxvf elasticsearch-2.1.0.tar.gz
$ ls -l
$ -rw-r--r--@ 1 inanzzz staff 28510433 5 Mar 14:27 elasticsearch-1.7.4.tar.gz
$ cd elasticsearch-1.7.4/bin
$ ./elasticsearch
[2016-03-05 14:28:22,694][INFO ][node ] [Raza] version[1.7.4], pid[96770], build[0d3159b/2015-12-15T11:25:18Z]
[2016-03-05 14:28:22,694][INFO ][node ] [Raza] initializing ...
[2016-03-05 14:28:22,774][INFO ][plugins ] [Raza] loaded [], sites []
[2016-03-05 14:28:22,817][INFO ][env ] [Raza] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [157.5gb], net total_space [232.6gb], types [hfs]
[2016-03-05 14:28:24,983][INFO ][node ] [Raza] initialized
[2016-03-05 14:28:24,983][INFO ][node ] [Raza] starting ...
[2016-03-05 14:28:25,075][INFO ][transport ] [Raza] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.0.56:9300]}
[2016-03-05 14:28:25,115][INFO ][discovery ] [Raza] elasticsearch/OFmYsRB0T3ycsgQr9Tgy1w
[2016-03-05 14:28:28,903][INFO ][cluster.service ] [Raza] new_master [Raza][OFmYsRB0T3ycsgQr9Tgy1w][Inans-MBP.default][inet[/192.168.0.56:9300]], reason: zen-disco-join (elected_as_master)
[2016-03-05 14:28:28,918][INFO ][http ] [Raza] bound_address {inet[/0:0:0:0:0:0:0:0:9201]}, publish_address {inet[/192.168.0.56:9201]}
[2016-03-05 14:28:28,919][INFO ][node ] [Raza] started
[2016-03-05 14:28:28,932][INFO ][gateway ] [Raza] recovered [0] indices into cluster_state
Elasticsearch server is normally accessible via port 9200
by default but when you run it manually like above instead of as a daemon, you'll have to use the IP and port given above as well. Port changes every time when you run the server.
# $ curl -X GET 192.168.0.56:9201
{
"status" : 200,
"name" : "Raza",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.4",
"build_hash" : "0d3159b9fc8bc8e367c5c40c09c2a57c0032b32e",
"build_timestamp" : "2015-12-15T11:25:18Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "You Know, for Search"
}
# http://192.168.0.56:9201/
{
"status" : 200,
"name" : "Gregor Shapanka",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.4",
"build_hash" : "0d3159b9fc8bc8e367c5c40c09c2a57c0032b32e",
"build_timestamp" : "2015-12-15T11:25:18Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "You Know, for Search"
}