# How to Install Elastic Search: A Step-by-Step Guide

# How to install Elastic Search

This is my first blog as a part of ELK stack series. As the first blog in this series, I’ll showing how to install Elastic Search, configure it, Start the service and get a response from it.

## Pre Requisites

Elasticsearch is built using `Java`, and includes a bundled version of OpenJDK within each distribution. So make sure java is already installed on the machine.

## Installation

Easy, Search for `Install Elastic Search` and go with the first link you see. [`Here`](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html) is what comes today from [elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html), the company behind this service. Depending on your platform, download the `.gz` or `.deb` or `.zip` file.

## Installation on Windows

Well, its simple and Hard.

Simple: Extract the zip file.

Hard: Wait forever for the extraction to complete or at least as on today. I strongly recommend you to do the extraction when you can afford few hours of downtime or away time from your machine.

## Post Extraction Steps for Windows

## Set the path

Copy the path where the file is extracted (Example path below) and map it to an new system or user variable.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1728451616107/22687e9c-7319-451d-949a-479af92aef84.png align="center")

| Key | Value |
| --- | --- |
|  |  |
| ES\_JAVA\_HOME | C:\\somepath\\elasticsearch\\elasticsearch-8.15.2\\jdk |

### Update config

1. Navigate to `elasticsearch\elasticsearch-8.15.2\config`
    
2. Open `elasticsearch.yml` file in your fav editor
    
3. Uncomment & change the details as below.
    

```yaml
# The placeholders are already there in the yml file. 
# Change values accordingly.

cluster.name: my-test-application
node.name: windows-node-1
network.host: 127.0.0.1 
# 127.0.0.1 or you can use ipconfig and take the ip address
cluster.initial_master_nodes: ["windows-node-1"]
xpack.security.enabled: false
# this is to disable security. Do not use this for production setup
 
```

### Install Elastic Search

1. Open Power shell as an Admin
    
2. Navigate to bin folder under elastic search as shown below and
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1728451008408/8886f7ba-847d-40d9-89e4-eba3f548e124.png align="center")

3. Run the command as shown below
    
4. ```powershell
    c:\elasticsearch\elasticsearch-8.15.2\bin> .\elasticsearch-service.bat install ElasticSearch
    ```
    

5. After successful installation, run `services.msc` and look for `elasticsearch-8.15.2` and start the service.
    
    1. If you make any changes to the config, remember to restart the service.
        

### Testing

To ensure Elastic Search is successfully installed, open your fav browser and hit the below url `http://127.0.0.1:9200` or you can also curl this url from a terminal.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1728452381477/9842aaf5-a470-4206-a1d7-9a7975962654.png align="center")

### **Have Fun with Elastic!**

---

## **Thank You**

If you have reached so far, congratulations. Please feel free to share your thoughts via the comments.

---

### Let's Connect

Feel free to connect with me on [**LinkedIn**](https://www.linkedin.com/in/sandeepgokhale/) and [**Twitter**](https://twitter.com/thegokhale) if you have any questions.

Until Next time!
