Skip to content

ElasticSearch

ElasticSearch#

Running a basic ElasticSearch server, single node, between 2GB and 4GB memory is enough. It can be expanded to a multi sharded cluster or cloud hosted at any time.

Default Port

Port 9200

Download & Install#

Elasticsearch (7.17.x) and JVM (v11) - Java Runtime/ JDK - Adoptium
- Oracle OpenJDK - ElasticSearch (No JDK)

After downloading and unzipping the JVM to a local directory (or install runner), the path to the unzipped location of Java bin directory must be included in the Environment variable 'Path'. set PATH=C:\jdk-17.0.8.1+1-jre\bin;%PATH% or setx /M PATH C:\jdk-17.0.8.1+1-jre\bin;%PATH%

Or use the GUI in Windows, go to System Properties:
System Properties

Click on Environment, and then Path en Edit..:
Environment Variables

Add the Path to the JDK:
Edit Environment Variables

Then Click on all of the OK buttons to complete adding the JDK to the Path.

More details on supported versions see Support Matrix of ElasticSearch.

Configuring ElasticSearch
Steps:

  1. In the directory where ElasticSearch was unzipped <ElasticPath>/config/jvm.options.d we create or edit the file jvm.options.
    vm.options
    -Xms4g
    -Xmx4g
    
    This will limit the memory usage of the JVM to 4Gig
  2. Next update <ElasticPath>/elasticsearch.yml
    elasticsearch.yml
     cluster.name: cc-cluster
     path.data: e:/elastic/data
     path.logs: e:/elastic/logs
     network.host: 0.0.0.0
     http.port: 9200
    
  3. For the bin directory run elasticsearch-service install, this will install ElasticSearch as a Windows Service. Then start the service elasticsearch-service start. And to see what it is doing run elasticsearch-service manager.
  4. Ensure the port 9200 is opened for network access in the firewall settings.

Default Port

Ensure port 9200 is opened for incoming traffic in your firewall or chews a different port.