Elasticsearch 7.17.x on Windows

Elasticsearch is a distributed, RESTful search and analytics engine designed for scalability, real-time performance, and high availability. It is widely used for log analysis, full-text search, and data indexing. This article provides step-by-step instructions for installing and configuring Elasticsearch 7.17.x on a Windows system.

Prerequisites

Before proceeding with the installation, ensure the following requirements are met:

  • Operating System: Windows 10 or later (64-bit)

  • Administrative Access: Required for installation and service configuration

  • Java Development Kit (JDK): Java 17 installed and configured

  • Environment Variable: JAVA_HOME set to the Java installation path Reference: Follow the [Java Installation Guide on Windows] for setup instructions.

Installation Steps

Download Elasticsearch

Download Elasticsearch 7.17.x from the official OvalEdge repository:

https://ovaledge.s3.us-west-1.amazonaws.com/scripts/packages/elasticsearch-7.17.26-windows-x86_64.zip

Extract the contents to a preferred location, for example:

C:\elasticsearch-7.17.x

Install Elasticsearch as a Windows Service

  1. Open Command Prompt as Administrator.

  2. Navigate to the Elasticsearch bin directory:

    cd C:\elasticsearch-7.17.x\bin
  3. Run the service installation command:

    elasticsearch-service.bat install

Configure JVM Heap Settings

  1. Navigate to the configuration directory:

    C:\elasticsearch-7.17.x\config
  2. Open jvm.options in a text editor (e.g., Notepad++).

  3. Uncomment and update the following values based on available memory:

    -Xms4g
    -Xmx4g

Recommendation: Allocate 50% of available system RAM (maximum 32 GB).

Configure Elasticsearch Settings

  1. Open elasticsearch.yml located in the same config folder.

  2. Add or update the following properties:

    cluster.name: ovaledge
    network.host: 0.0.0.0
    transport.host: localhost
    transport.tcp.port: 9300
    http.port: 9200
    xpack.security.enabled: true

  3. Save and close the file.

Start the Elasticsearch Service

  1. Open the Windows Services Manager (Win + R → services.msc).

  2. Locate the Elasticsearch service.

  3. Right-click and select Start.

Set Password for the Elastic User

  1. Navigate to the Elasticsearch bin folder.

  2. Open Command Prompt in that directory and run:

    elasticsearch-reset-password interactive
  3. When prompted, press y to continue.

  4. Set a password for the elastic user.

Note: The utility may require multiple confirmations (~12 times).

Verify Installation

  1. Open a web browser and navigate to:

    http://localhost:9200
  2. When prompted, enter credentials:

    • Username: elastic

    • Password: (as configured in the previous step)

  3. A successful installation returns a JSON response with cluster metadata.


Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.

Last updated

Was this helpful?