Friday, January 7, 2022

[SOLVED] Trouble installing and running elasticsearch

Issue

Yes, I have thoroughly searched for another answer to this question but have yet to find one.

I tried installing first by following the instructions on this page: http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html

I am not sure what to do after this step. It seems that is has installed correctly, but I don't know how to run it. (I am using PuTTY.) Can I import it into my module now and being using it, or is there something else I should do?

Here are some attempts I've made:

deloacha@azdev-deloacha:~$ bin/elasticsearch.bat
-bash: bin/elasticsearch.bat: No such file or directory
deloacha@azdev-deloacha:~$ cd elasticsearch-1.5.1/bin
-bash: cd: elasticsearch-1.5.1/bin: No such file or directory
deloacha@azdev-deloacha:~$ cd elasticsearch-1.5.1
-bash: cd: elasticsearch-1.5.1: No such file or directory
deloacha@azdev-deloacha:~$ cd ..
deloacha@azdev-deloacha:/home$ cd elasticsearch-1.5.1
-bash: cd: elasticsearch-1.5.1: No such file or directory

Solution

Installing the way as provided in the document can sometimes leads to confusion. You need to find the directory containing the elasticsearch files. most probably it'll be at "/etc/elast...."

Another easy way of installation follow the steps:

  1. make a directory where you want to install
  2. go to that directory and download elasticsearch there using

    wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.1.tar.gz or curl

  3. extract files: tar -zxvf elasticsearch-1.5.1.tar.gz
  4. cd elasticsearch-1.5.1
  5. You need to have java 7 on your system. you can start elasticsearch using "bin/elasticsearch -d" . "-d" is to run in detached mode.
  6. Logs are by default in the location elasticsearch-1.5.1/logs. Check logs for any error during start up.
  7. check status at: http://localhost:9200 or http://{system ip}:9200


Answered By - Prabin Meitei