Installing Elasticsearch

To install Elasticsearch in your container, you have to run the following commands in the IDE terminal.

Elasticsearch is based on Java, therefore you have to run the following commands to install OpenJDK 8.
Note: You can skip this step if you selected the Java template for your container.

sudo apt update
sudo apt install openjdk-8-jdk

Now that OpenJDK is installed, import the Elasticsearch GPG key:

wget -qO - | sudo apt-key add -

Register the Elasticsearch repository:

sudo sh -c 'echo "deb stable main" > /etc/apt/sources.list.d/elastic-6.x.list'

Update the package index and install the elasticsearch package.

sudo apt-get update
sudo apt-get install elasticsearch

After installing Elasticsearch package, run the following commands below to start the service and make sure it automatically starts up whenever the server boots up.

sudo systemctl start elasticsearch.service
sudo systemctl enable elasticsearch.service

See the official documentation for more information on configuring Elasticsearch.