No Java runtime present, requesting install.
Prerequisite: Java 8 (only Oracle’s Java).
Install Java version 1.8.0_73 or later.
Download Java:
https://java.com/en/download/
Go to control panel and click on Java to check the installed version.
$ brew install wget
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.zip
$ brew install md5sha1sum
sha1sum elasticsearch-5.4.0.zip
6ca6f8157fe2bb6b9d07ac6c77a96a5ff366e420 elasticsearch-5.4.0.zip
No Java runtime present, requesting install.
Elasticsearch requires at least Java 8 but your Java version from /usr/bin/java does not meet this requirement
Download Java SE Development Kit
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
You have to install JDK not JRE.
Go to the elasticsearch-5.4.0 directory and run:
$ ./bin/elasticsearch
Check Elastisearch
$ curl -XGET 'localhost:9200/?pretty'
{
"name" : "hnG_yFT",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "dk03YftTQrO6qH0iLxSkHg",
"version" : {
"number" : "5.4.0",
"build_hash" : "780f8c4",
"build_date" : "2017-04-28T17:43:27.229Z",
"build_snapshot" : false,
"lucene_version" : "6.5.0"
},
"tagline" : "You Know, for Search"
}
References
[Install Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-targz.html)
[Searchkick Gem](https://github.com/ankane/searchkick)