How to run more nodes in cluster as service in Centos

I have downloaded elasticsearch tar.gz for every nodes. I have modified elasticsearch.yml for each node.
I made a script for running each nodes. Script is like below :

sh ../node1/bin/elasticsearch
sh ../node2/bin/elasticsearch

when i run the script I get some error on logs but after the errors. The cluster runs with status green.
When I try to make this script as service, it doesn't work.

What is the suggested way to make elasticsearch as service with multi nodes without docker ?

Thanks for answering

can you use rpm? Generally, following the offline installation method is the best option.
otherwise, you have to create manually the service file

1 Like

You will also need to manually manage multiple config directories, keystores, data directories and more.

You might be able to do this automatically with config management tools, but docker is the current best practise.

1 Like

I ve tried rpm. But I can only install one instance of elasticsearch with rpm. OS doesn't give permission to install two same rpm. I want to have 10 nodes so I should install this ten times but how can i do this with same rpm in centos 7 ? If explain that will solve the problem

so, you want to install several instances of Elasticsearch on the same single server?
after that you installed the first one with rpm, you have to duplicate all the folders (i.e. /etc/elasticsearch, /usr/share/elasticsearch, /yourdata/elasticsearch and so). then, you have to duplicate your service file to use every /bin folder

1 Like

Or use docker and remove a lot of the pain/


Thank you I'll try this. Is it wrong to have several nodes in same single server in production ?

as usual:

  • cluster purpose? log? business?
  • production for your work? your business company or your homework?

from my perspective, several instances on the same server is a thrill (it is a single point of failure) and to be honest I don't see the real benefits. but as I said, it is only my point of view.
at the end, I would probably follow the @warkolm suggestion (docker usage).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.