Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

trying to get elastic search to run

I want to get Elastic Search running in my Windows 7 environment, but being a complete NOOB in the Java world, I am not having success.

I downloaded and installed the latest version of Java and the latest JDK. I navigate to my .\elasticsearch-0.18.6\bin directory and run elasticsearch.bat. I get ...

JAVA_HOME environment variable must be set!

Can someone enlighten me on the proper Java setup I need on my machine so everything is there that elastic search needs?

like image 541
John Livermore Avatar asked Jan 06 '12 16:01

John Livermore


People also ask

How do I start Elasticsearch?

The method for starting Elasticsearch varies depending on how you installed it. If you installed Elasticsearch with a .tar.gz package, you can start Elasticsearch from the command line. Run the following command to start Elasticsearch from the command line:

Why is my Elasticsearch search so slow?

It is a powerful feature, but it can majorly affect your search speed. You should be careful when using scripts because Elasticsearch will apply the script to every result. The more data you have in the index, the slower the search will become as it goes over every result. Wildcard queries in Elasticsearch are similar to LIKE queries in SQL.

How do I stop Elasticsearch in Linux?

While Elasticsearch is running you can interact with it through its HTTP interface which is on port 9200 by default. To stop Elasticsearch, press Ctrl-C. All scripts packaged with Elasticsearch require a version of Bash that supports arrays and assume that Bash is available at /bin/bash.

Why would I use Elasticsearch console?

It’s handy to recreate how Elasticsearch actually runs on your box. You might want to debug something. Or perhaps you’d just like to see the log statements scroll by this console window. This might also be handy if you’re running the zip or tarred versions directly and want to know what all the knobs and dials do.


2 Answers

         **How to Set Java_Home Environment**

-->Go to the drive where your windows is installed (generally it is c:\ drive) in "my computer".

-->Now go to "program files" folder and then go inside "java" folder( for a 64 bit OS, if the "JAVA" folder is not found, consider looking in "Program Files(x86)" folder). -->Look for a JAVA JDK installation folder. If you don't have it, then download java jdk and install the latest.

-->Copy the path name(e.g.C:\Program Files\Java\jdk1.8.0_05) or just write it down on paper.

-->Now go to your desktop; right click on "my computer" icon; go to properties; go to "Advanced System Settings"; click on "Environment Variables"; click "new" in "System Variables".

-->Now, in "Variable Name" write "JAVA_HOME" and in the "Variable Value" area, put in the path of the JDK installation folder(e.g. C:\Program Files\Java\jdk1.8.0_05).

-->Click "OK" and again "OK" and "OK" again. Close any open windows( Not Necessarily).

                                      ALL DONE!!

Go ahead and run your ElasticSearch Batch file.

like image 55
user4314585 Avatar answered Sep 29 '22 09:09

user4314585


Take a look at this link about setting the JAVA_HOME environment variable. This is just the first (of many) results from a Google search for "setting JAVA_HOME environment variable".

like image 40
Anthony Grist Avatar answered Sep 29 '22 10:09

Anthony Grist