This document provides step-by-step instructions to set up Elasticsearch on Linux and Windows, along with common operations such as creating an index, syncing data, and searching data.

1. Prerequisites

2. Elasticsearch Installation

2.1 Linux Setup (Ubuntu / RHEL)

Step 1: Download Elasticsearch

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.x.x-linux-x86_64.tar.gz

Step 2: Extract the Archive

tar -xzf elasticsearch-8.x.x-linux-x86_64.tar.gz
cd elasticsearch-8.x.x

Step 3: Configure Elasticsearch

Edit config/elasticsearch.yml

cluster.name: elasticsearch-cluster
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
discovery.type: single-node

Step 4: Start Elasticsearch

./bin/elasticsearch

Step 5: Verify Installation

curl http://localhost:9200

2.2 Windows Setup

Step 1: Download Elasticsearch

Step 2: Extract ZIP File

Step 3: Configure Elasticsearch

Edit config\elasticsearch.yml

cluster.name: elasticsearch-cluster
node.name: node-1
network.host: localhost
http.port: 9200
discovery.type: single-node

Step 4: Start Elasticsearch

bin\elasticsearch.bat

Step 5: Verify Installation

Open browser or Postman:

http://localhost:9200