Yes and I did that recently with my laptop for experimentation with things that I would like to do with ES Cluster. This setup simplifies my environment, instead of using docker or using multiple machines/VMs/EC2 instances.
You can download and use the .tar.gz file recommended above, and then you can do one of the following options
-
option 1 - untar the file into two directories: es-01, es-02 then update the config file in each node
-
option 2 - untar the file into one directory: es-instance, copy the config directory to another location with something like path/to/es-01/config, path/to/es-02/config then create a script to launch elasticsearch from the same binary location (which is es-instance) but use different config location (one for es-01/config, one for es-02/config)
You need to update the following parameters in config/elasticsearch.yml file to separate one node from the other.
- cluster.name
- node.name
- path.data
- path.logs
- http.port