# Issue with Elasticsearch installation on CentOS

**URL:** <https://discuss.elastic.co/t/issue-with-elasticsearch-installation-on-centos/80135>\
**Category:** Elasticsearch\
**Created:** [March 27, 2017, 1:03pm UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-installation-on-centos/80135 "2017-03-27T13:03:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sambit\_Kabi](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Sambit\_Kabi](https://discuss.elastic.co/u/Sambit_Kabi)\
**Post date:** [March 27, 2017, 1:03pm UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-installation-on-centos/80135/1 "2017-03-27T13:03:46Z")

</div>

I am trying to install elasticsearch 5.2.2 in CentOS. What's unique is that I want to use the jre which is distributed with our product. We create a user say user1 and install our product. The jre is in directory say /XYZ/jre64. Now I want to install elasticsearch and make it use our jre to run.

I was able to run it with the following changes:

1. Installed ES using the rpm distribution and installed it.
2. Upon installation it creates a default user and group called elasticsearch
3. I went to the /etc/init.d/elasticsearch script and changed the user to user1. I did this because elasticsearch user didn't have permission to the /XYZ/jre64 folder which was created by user1 and I didn't want to change the permission of it.
4. Then I had to give read write permissions to the log ,config ,path folders of the elasticsearch.
5. Ran the service and it worked.

I am overall not satisfied with the way I changed the user and then had to change the permissions of the elasticsearch specific directories.  
Is there a better approach to do this? Can we specify custom user while installing the elasticsearch and not after installing and changing the permissions?

Is there a better approach to this type of installation?

---

<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:** [March 30, 2017, 1:18am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-installation-on-centos/80135/2 "2017-03-30T01:18:49Z")

</div>

Maybe you can just use the tar.gz or zip distributions?

---

<div class="post-metadata">

**Author:** ![Sambit\_Kabi](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Sambit\_Kabi](https://discuss.elastic.co/u/Sambit_Kabi)\
**Post date:** [March 30, 2017, 7:01am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-installation-on-centos/80135/3 "2017-03-30T07:01:37Z")

</div>

Ok let me try it out then..

---

<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:** [April 27, 2017, 7:01am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-installation-on-centos/80135/4 "2017-04-27T07:01:48Z")

</div>

Closed on April 27, 2017, 7:01am UTC

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