# How to run more nodes in cluster as service in Centos

**URL:** <https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549>\
**Category:** Elasticsearch\
**Created:** [April 19, 2021, 8:15am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549 "2021-04-19T08:15:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rknd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rknd/32/103882_2.png) [@rknd](https://discuss.elastic.co/u/rknd)\
**Post date:** [April 19, 2021, 8:15am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/1 "2021-04-19T08:15:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [April 19, 2021, 3:23pm UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/2 "2021-04-19T15:23:29Z")

</div>

Hey,  
can you use rpm? Generally, following the [offline installation](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/rpm.html#install-rpm) method is the best option.  
otherwise, you have to create manually the `service` file

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 20, 2021, 2:25am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/3 "2021-04-20T02:25:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rknd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rknd/32/103882_2.png) [@rknd](https://discuss.elastic.co/u/rknd)\
**Post date:** [April 21, 2021, 11:48am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/4 "2021-04-21T11:48:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [April 21, 2021, 5:21pm UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/5 "2021-04-21T17:21:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 21, 2021, 10:28pm UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/6 "2021-04-21T22:28:27Z")

</div>

Or use docker and remove a lot of the pain/

---

<div class="post-metadata">

**Author:** ![rknd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rknd/32/103882_2.png) [@rknd](https://discuss.elastic.co/u/rknd)\
**Post date:** [April 22, 2021, 6:51am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/7 "2021-04-22T06:51:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [April 22, 2021, 8:00am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/8 "2021-04-22T08:00:41Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 20, 2021, 8:01am UTC](https://discuss.elastic.co/t/how-to-run-more-nodes-in-cluster-as-service-in-centos/270549/9 "2021-05-20T08:01:01Z")

</div>

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