Reputation: 59
As per the install wiki [https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-targz.html#install-targz] I have the elasticsearch-5.4.3 installed.
./bin/elasticsearch gave the following error :
Elasticsearch requires at least Java 8 but your Java version
from /usr/bin/java does not meet this requirement
So I have downloaded the latest version of java as well in the same directory as that of elasticsearch.
But running the following command still errors out
./jre1.8.0_151/bin/java ./elasticsearch-5.4.3/bin/elasticsearch
with error message :
Error: Could not find or load main class ..elasticsearch-5.4.3.bin.elasticsearch
What could be the remedy for this ?
Upvotes: 0
Views: 1736
Reputation: 112
Possibility 1: don't start with java, run elasticsearch directly
step 1: set the $JAVA_HOME to your latest 1.8 java installation
step 2: run the command ./bin/elasticsearch
Possibility 2: permission issue
step 1: set SELinux to permissive mode
step 2: run the installation command from the same user from which you have downloaded and extracted the elasticsearch packages.
Upvotes: 1
Reputation: 970
first install your java (version 8+) and set $JAVA_HOME variable or download java. use update-alternative to set default java.
update-alternatives: warning: /etc/alternatives/java is dangling
then, install elasticsearch from rpm file and config /etc/elasticsearch/elasticsearch.yml.
https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html
now, you can start elasticseach service by executing :
service elasticsearch start
Upvotes: 1