Elasticsearch 7.17.x on Amazon Linux

This article provides a comprehensive guide for installing Elasticsearch 7.17.x on Ubuntu 22.04 and Amazon Linux. It includes prerequisites, installation steps, configuration instructions, and integration with the OvalEdge application.

Hardware Requirements

  • Memory: Minimum 4 GB RAM (8 GB recommended)

  • CPU: Minimum 2 vCPUs

  • Disk Space: Minimum 10 GB free

Prerequisites

  • User account with sudo privileges

  • Stable internet connection

  • Java 17 installed (Amazon Corretto or OpenJDK). Elasticsearch 7.17.x requires Java 17.

Elasticsearch Installation (Amazon Linux)

Follow the steps below to install and start Elasticsearch 7.x on Amazon Linux.

Install Java 17

  • Elasticsearch requires Java 17. Use Amazon Corretto 17:

    sudo yum install java-17-amazon-corretto -y

    java -version
  • If Java is already installed and java -version returns a supported version, skip this step.

Import the GPG Key

  • Add the Elastic GPG key for the Elasticsearch repository:

Create Elasticsearch Repository

  • Create the elasticsearch.repo file in the /etc/yum.repos.d/ directory on RedHat-based systems.

  • Add the following content:

Install Elasticsearch

  • Update packages and install Elasticsearch:

Enable and Start Elasticsearch

  • Start the Elasticsearch service after installation.

  • Reload the systemd manager configuration to recognize the new service:

  • Enable Elasticsearch on boot:

  • Start and verify status:

  • Ensure the status shows active (running) before proceeding.

Configure Elasticsearch

Elasticsearch requires configuration updates to define cluster settings, enable network access, and activate security features.

Edit elasticsearch.yml

  • Edit the elasticsearch.yml file in the /etc/elasticsearch/ directory to configure Elasticsearch.

  • Append or modify:

Restart Elasticsearch

  • Restart the Elasticsearch Service.

  • Verify it responds on port 9200

Set Up Password for Elastic User

Elasticsearch includes built-in reserved users that require password configuration. These users are used by various components within the Elastic Stack for authentication and internal communication.

  • Navigate to the bin directory:

  • Run password setup:

  • When prompted, type y to continue.

  • Enter and confirm a secure password for each built-in user (e.g., elastic, kibana, logstash_system).

  • For simplicity and manageability, the same password can be used for all users, but this is optional.

    Record these credentials securely. The elastic user credentials will be required for integrating Elasticsearch with other applications such as OvalEdge.

Integration with OvalEdge

To integrate Elasticsearch with the OvalEdge application, update the relevant configuration in the oasis.properties file located on the OvalEdge application server.

Edit oasis.properties

  • Navigate to extprop directory:

  • Configure Elasticsearch Connection Parameters

    • If Elasticsearch is on the same VM: es.host=localhost

    • If on another VM: Replace <elasticsearch_host> with its IP or hostname

    • Add the elasticsearch user password configured during the Elasticsearch setup.

Restart Tomcat

  • Restart OvalEdge application:

  • Ensure Elasticsearch is running and accessible before restarting Tomcat.


Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.

Last updated

Was this helpful?