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 -versionreturns a supported version, skip this step.
Import the GPG Key
Add the Elastic GPG key for the Elasticsearch repository:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Create Elasticsearch Repository
Create the elasticsearch.repo file in the /etc/yum.repos.d/ directory on RedHat-based systems.
sudo vi /etc/yum.repos.d/elasticsearch.repo
Add the following content:
[Elasticsearch-7] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Install Elasticsearch
Update packages and install Elasticsearch:
sudo yum update -y sudo yum install elasticsearch -y
Enable and Start Elasticsearch
Start the Elasticsearch service after installation.
Reload the systemd manager configuration to recognize the new service:
sudo systemctl daemon-reloadEnable Elasticsearch on boot:
sudo systemctl enable elasticsearch.service
Start and verify status:
sudo systemctl start elasticsearch.service sudo systemctl status elasticsearch.service
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.
sudo vim /etc/elasticsearch/elasticsearch.ymlAppend or modify:
cluster.name: ovaledge network.host: 0.0.0.0 transport.host: localhost transport.tcp.port: 9300 http.port: 9200 xpack.security.enabled: true cluster.name: Logical name for the Elasticsearch cluster. network.host: Binds the HTTP service to all available network interfaces. xpack.security.enabled: Enables built-in security features including authentication and TLS.
Restart Elasticsearch
Restart the Elasticsearch Service.
sudo systemctl restart elasticsearch.service
Verify it responds on port
9200curl http://localhost: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:
cd /usr/share/elasticsearch/binRun password setup:
sudo ./elasticsearch-setup-passwords interactiveWhen 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
oasis.propertiesNavigate to extprop directory:
cd /<path_to_ovaledge>/extprop sudo vi oasis.propertiesConfigure Elasticsearch Connection Parameters
If Elasticsearch is on the same VM:
es.host=localhostIf on another VM: Replace
<elasticsearch_host>with its IP or hostnameAdd the elasticsearch user password configured during the Elasticsearch setup.

Restart Tomcat
Restart OvalEdge application:
sudo systemctl restart tomcatEnsure Elasticsearch is running and accessible before restarting Tomcat.
Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
Last updated
Was this helpful?

