Elasticsearch Installation notes
Recently, we are considering adding elasticsearch to the company's saas platform to enhance its search function.
Download https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.0.zip
Unzip-d. elasticsearch-1.5.0.zip
Cd elasticsearch-1.5.0/bin
./Elasticsearch
Prompt
Can't start up: not enough memory
I was dumb at the time. This server has 16 GB of memory and at least half of it is idle.
After determining whether the jdk is correct, the gnu gij installed on centos is not deleted by default.
In the elasticsearch script
Added
Export JAVA_HOME =/software/jdk1.7.0 _ 40
Run again
./Elasticsearch
Prompt
{1.5.0}: Initialization Failed...
-RuntimeException [Java version: 1.7.0 _ 40 suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data resume uption.
Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendations.
If you absolutely cannot upgrade, please add-XX:-UseSuperWord to the JVM_OPTS environment variable.
Upgrading is preferred, this workaround will result in degraded performance.]
The prompt is too strange. jdk 1.7 Is the jdk of my online system. Is there a serious bug?
Take a look, elasticsearch install guide,
Elasticsearch requires Java 7. Specifically as of this writing, it is recommended that you use the Oracle JDK version 1.8.0 _ 25.
You still recommend that you determine the jdk version and use jdk 8 forcibly before running.
I initially felt that it was too amateur to start shell writing.
Modify JAVA_HOME
Export JAVA_HOME =/software/jdk1.8.0 _ 40
Run
./Elasticsearch
Input
Http: // 192.168.9.253: 9200 /? Pretty
See
{ "status" : 200, "name" : "Mephisto", "cluster_name" : "elasticsearch", "version" : { "number" : "1.5.0", "build_hash" : "544816042d40151d3ce4ba4f95399d7860dc2e92", "build_timestamp" : "2015-03-23T14:30:58Z", "build_snapshot" : false, "lucene_version" : "4.10.4" }, "tagline" : "You Know, for Search"}Installation Complete