# Troubles with installation instructions on ubuntu

**URL:** <https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [August 7, 2020, 8:49am UTC](https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141 "2020-08-07T08:49:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophvh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophvh/32/46494_2.png) [@Christophvh](https://discuss.elastic.co/u/Christophvh)\
**Post date:** [August 7, 2020, 8:49am UTC](https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141/1 "2020-08-07T08:49:52Z")

</div>

I'm running a vagrant box which runs ubuntu inside a vm (using Laravel Homestead box)

I'm trying to install the Elastic App-search product.

The first requirement is to install Elastic search, which I have done multiple times. I did the following steps:

> **[Install Elasticsearch with Debian Package | Elasticsearch Guide \[8.4\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html)**

```auto
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

```

```auto
sudo apt-get install apt-transport-https

```

```auto
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

```

```auto
sudo apt-get update && sudo apt-get install elasticsearch

```

I'm using the systemd configuration:

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

```

I'm running curl localhost:9200 and everything is working.

Next I try to install elastic app search.  
[Installation | Elastic App Search Documentation [8.4] | Elastic](https://www.elastic.co/guide/en/app-search/current/installation.html#installation-self-managed).  
Which doesn't have instructions for debian systems. But it does have a .deb install file. I downloaded the file and put it in my project route.

I ran dpkg -i on the file and it seems to have installed. When I run the command to check the file location it shows this:

```auto
 dpkg -L enterprise-search

```

```
/.
/etc
/etc/init.d
/etc/init.d/enterprise-search
/var
/var/log
/var/log/enterprise-search
/usr
/usr/share
/usr/share/enterprise-search
/usr/share/enterprise-search/README.md
/usr/share/enterprise-search/bin
/usr/share/enterprise-search/bin/vendor
/usr/share/enterprise-search/bin/vendor/filebeat
/usr/share/enterprise-search/bin/vendor/filebeat/filebeat-linux-x86_64
/usr/share/enterprise-search/bin/enterprise-search
/usr/share/enterprise-search/filebeat
/usr/share/enterprise-search/filebeat/ecs-template.json
/usr/share/enterprise-search/filebeat/filebeat-ecs.yml
/usr/share/enterprise-search/lib
/usr/share/enterprise-search/lib/require_java_version.sh
/usr/share/enterprise-search/lib/enterprise-search.war
/usr/share/enterprise-search/jetty
/usr/share/enterprise-search/jetty/webserver-ssl.xml
/usr/share/enterprise-search/jetty/webserver-ssl-with-redirect.xml
/usr/share/enterprise-search/jetty/webserver.xml
/usr/share/enterprise-search/LICENSE
/usr/share/enterprise-search/config
/usr/share/enterprise-search/config/env.sh
/usr/share/enterprise-search/config/enterprise-search.yml
/usr/share/enterprise-search/NOTICE.txt
/usr/share/doc
/usr/share/doc/enterprise-search
/usr/share/doc/enterprise-search/changelog.gz
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/enterprise-search.service

```

I'm not really sure if this is the correct location? I want it to live in the same place as my elasticsearch install, but I'm actually not sure. I did all the next steps for the install process and ran:  
./usr/share/enterprise-search/bin/elasticsearch

But this gives me the error:

```
Could not find java in PATH

```

I'm confused by this since the main elasticsearch installation works and that also needs java? Also, I want it also to run with systemd auto-enable and I want it to be available with enterprise-search start/stop. Not sure how to handle that.

---

<div class="post-metadata">

**Author:** ![fgjensen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fgjensen/32/62320_2.png) [@fgjensen](https://discuss.elastic.co/u/fgjensen)\
**Post date:** [August 7, 2020, 9:05am UTC](https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141/2 "2020-08-07T09:05:02Z")

</div>

Hi @Christophvh, Elasticsearch comes bundled with Java. For Enterprise-search you have to setup Java 8 or 11 according to the documentation, see [https://www.elastic.co/guide/en/enterprise-search/current/installation.html#installation-self-managed](https://www.elastic.co/guide/en/enterprise-search/current/installation.html#installation-self-managed) and configure JAVA\_HOME for Enterprise-search.

---

<div class="post-metadata">

**Author:** ![Christophvh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophvh/32/46494_2.png) [@Christophvh](https://discuss.elastic.co/u/Christophvh)\
**Post date:** [August 7, 2020, 9:13am UTC](https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141/3 "2020-08-07T09:13:04Z")

</div>

Hi @fgjensen Thanks for the answer, but that is my question. I have java installed since i have elasticsearch installed, why do i have to install java 2 times?

I have reinstalled java and now it works. Seems absurd to have 2 instances running? But i guess thats normal?

Also i tried:  
sudo /bin/systemctl daemon-reload  
sudo /bin/systemctl enable enterprise-search.service

sudo /bin/systemctl start enterprise-search.service

But this hogs all memory and keeps crashing. When running:  
./bin/enterprise-search it works without problems?

---

<div class="post-metadata">

**Author:** ![fgjensen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fgjensen/32/62320_2.png) [@fgjensen](https://discuss.elastic.co/u/fgjensen)\
**Post date:** [August 9, 2020, 8:55am UTC](https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141/4 "2020-08-09T08:55:46Z")

</div>

As I understand the documentation Java 8 or 11 is a prerequisite for installing Enterprise Search. So you could have installed Java 11 first, configure JAVA\_HOME and used this JDK for both installations. An other option is to configure JAVA\_HOME to point to the jdk delivered with Elasticsearch search, since Enterprise Search requires JAVA\_HOME to be set. You do not need to install Java twice, but you can e.g. run Elasticsearch with Java 14 and Enterprise Search with Java 11. How much memory does the VM have and how much is reserved for Elasticsearch? When you try to start Enterprise Search as a service what does it write to the journal e.g. `sudo journalclt -r -u Enterprisesearch`

---

<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:** [September 6, 2020, 8:55am UTC](https://discuss.elastic.co/t/troubles-with-installation-instructions-on-ubuntu/244141/5 "2020-09-06T08:55:48Z")

</div>

Closed on September 6, 2020, 8:55am UTC

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