How to Install and Run Elasticsearch as a Windows Service

Planning to keep this as simple and helpful as I can.
This whole process can be done in just a few minutes, assuming your downloads happen quickly.

Prerequisites:

  1. Log in to your server with credentials that allow software installation.
  2. Download Elasticsearch (latest. 1.5.2 used in this example) as a ZIP file from https://www.elastic.co/downloads/elasticsearch
  3. Unzip the file you just downloaded.
  4. Copy the child Elasticsearch1.5.2 folder and contents to C:\elasticsearch-1.5.2, or wherever you want it.
    • (You should have this path: D:\elasticsearch-1.5.2\bin )
  5. Download and install Java JDK 64 bit version from: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  6. Set JAVA_HOME environment variable:
  7. java_home

  8. Install Elasticsearch as a service:
  9. (Here’s the original reference if needed)

    1. Run command prompt as administrator
    2. Navigate to C:\elasticsearch-1.5.2\bin
    3. Type service.bat install and hit Enter.
    4. It should install as a 64 bit service:
    5. es_console

    6. Close command prompt
    7. Open services console, and find Elasticsearch service.
    8. Open Elasticsearch service properties and set the service to start automatically and then start service.
    9. In a browser on the server, go to http://localhost:9200/
    10. You should see something like this (Note that the “name” is randomly selected from a list of around 3000 Marvel characters.):
    11. es_screenprint

  10. If you see that, you have successfully installed Elasticsearch in a cluster with one node, and you rock.
  11. Setting up multiple nodes is beyond the scope of this article.

    Elasticsearch is amazing, and running as a Windows Service is nice, because you don’t have to make sure you start it manually each time.

Leave a Reply

Your email address will not be published. Required fields are marked *