# Elasticsearch symlink does not start the service if installed from archive

**URL:** <https://discuss.elastic.co/t/elasticsearch-symlink-does-not-start-the-service-if-installed-from-archive/309574>\
**Category:** Elasticsearch\
**Created:** [July 13, 2022, 6:31pm UTC](https://discuss.elastic.co/t/elasticsearch-symlink-does-not-start-the-service-if-installed-from-archive/309574 "2022-07-13T18:31:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marius03](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius03/32/108278_2.png) [@marius03](https://discuss.elastic.co/u/marius03)\
**Post date:** [July 13, 2022, 6:31pm UTC](https://discuss.elastic.co/t/elasticsearch-symlink-does-not-start-the-service-if-installed-from-archive/309574/1 "2022-07-13T18:31:50Z")

</div>

I installed Elasticsearch & Kibana in Linux Mint 20.3 localhost with archive option because installation from Debian Package does not work as expected: [Install Elasticsearch from archive on Linux or MacOS | Elasticsearch Guide [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/targz.html).  
Everything works perfectly in the browser if I start the service in the terminal with: ./bin/elasticsearch (from the folder where I installed Elasticsearch).

**The problem is that the following CL commands do not activate the services at startup as long as the installation is from the archive (direct) and not through the package manager.**

```auto
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

```

**So I had to create a symlink:**  
`ln -s /home/marius/software/elasticsearch/elasticsearch-8.3.2/bin/elasticsearch /usr/share/elasticsearch/bin/elasticsearch`

**After restart:**  
`sudo /bin/systemctl status elasticsearch.service`

**Result:**

```auto
elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2022-07-13 19:58:44 EEST; 1h 28min ago
       Docs: http://www.elastic.co
    Process: 1528 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 1528 (code=exited, status=1/FAILURE)

Jul 13 19:58:44 marius systemd[1]: Started Elasticsearch.
Jul 13 19:58:44 marius elasticsearch[1528]: /usr/share/elasticsearch/bin/elasticsearch: line 5: /usr/share/elasticsearch/bin/elasticsearch-cli: No such file or directory
Jul 13 19:58:44 marius systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jul 13 19:58:44 marius systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

```

However I try to create the simlink I get various errors.

The question is: How do I create a symlink and enable Elasticsearch to start at startup? I repeat what I said at the beginning; "Everything works perfectly in the browser if I start the service in the terminal with: ./bin/elasticsearch".

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 13, 2022, 7:10pm UTC](https://discuss.elastic.co/t/elasticsearch-symlink-does-not-start-the-service-if-installed-from-archive/309574/2 "2022-07-13T19:10:56Z")

</div>

Hi @marius03 Welcome to the community!

Well to use elasticsearch as a service I would recommend install a .deb or .rpm and all this will be properly taken care of for you...

> [@marius03](#):
>
> However I try to create the simlink I get various errors.

What errors? ... You mean this below..

> [@marius03](#):
>
> `Jul 13 19:58:44 marius elasticsearch[1528]: /usr/share/elasticsearch/bin/elasticsearch: line 5: /usr/share/elasticsearch/bin/elasticsearch-cli: No such file or directory`

yes you will probably need to create sim links to a number of the executables the `elasticsearch` "bin" is actually a script that does a lot of things.

If you want to use as a service I would install via one of the package managers... but perhaps I am missing something

---

<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:** [August 10, 2022, 7:10pm UTC](https://discuss.elastic.co/t/elasticsearch-symlink-does-not-start-the-service-if-installed-from-archive/309574/3 "2022-08-10T19:10:58Z")

</div>

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