Elasticsearch 7.17.x on Ubuntu 22.04+
This article provides a comprehensive guide for installing Elasticsearch version 7.17.x on an Ubuntu 22.04 system. It includes prerequisites, installation steps, configuration, and performance optimization guidelines recommended by OvalEdge.
Prerequisites
Before proceeding, ensure the following requirements are met:
Operating System: Ubuntu 22.04 LTS or later
User Access: Root or a user with
sudoprivilegesNetwork: Stable internet connection
Java: Java 17 installed (
openjdk-17-jdk)Firewall: Ensure required ports are open (
9200,9300)
Installation Steps
Java Installation
Log in to the Elasticsearch VM and install Java 17:
sudo apt update -y sudo apt install -y openjdk-17-jdk java --versionSample Reference Screenshot
Elasticsearch Installation
Update Package Index and Enable HTTPS Support
Before installing Elasticsearch, update the package index and ensure secure APT transport is enabled:
sudo apt update -y sudo apt install apt-transport-https -y
Create Elasticsearch Repository File
Download and add the GPG key, then configure the repository:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'Install Elasticsearch
Run the following commands to install Elasticsearch:
sudo apt update sudo apt install elasticsearch -yEnable and Start the Service
Enable Elasticsearch to start at boot and then start the service:
sudo systemctl daemon-reexec sudo systemctl enable elasticsearch sudo systemctl start elasticsearch
Elasticsearch Configuration
Configure Elasticsearch Settings
Open the Elasticsearch configuration file:
sudo vi /etc/elasticsearch/elasticsearch.ymlAdd or update the following parameters:
cluster.name: ovaledge network.host: 0.0.0.0 http.port: 9200 transport.host: localhost transport.tcp.port: 9300 xpack.security.enabled: trueConfigure JVM Heap Size
Edit the JVM options file:
sudo vi /etc/elasticsearch/jvm.optionsLocate the following lines (usually near the top of the file):
## -Xms4g ## -Xmx4gUncomment and configure them:
-Xms4g -Xmx4gRestart Elasticsearch
Restart the service to apply changes:
sudo systemctl restart elasticsearch
Elasticsearch Passwords
Set Password for Elastic User
Run the password reset tool:
sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic -iWhen prompted:
Type y and enter a new password for the
elasticuserConfirm the password if requested
Verify Installation
Verify Service Availability
Use
curlor a browser to verify Elasticsearch is running:curl http://localhost:9200 -u elastic:<password>Replace
<password>with the password set previouslyA successful response should display cluster information in JSON format

Integrate Elasticsearch with OvalEdge
Locate and Edit
oasis.propertiesOn the OvalEdge application VM, navigate to the
extpropdirectory and open the file:vi /path/to/ovaledge/extprop/oasis.propertiesUpdate Elasticsearch Section
Configure the following parameters:
es.host=<elasticsearch_host> es.port=9200 es.protocol=http es.username=elastic es.password=<password>Restart Tomcat Service
Restart Tomcat to apply the updated configuration:
sudo systemctl restart tomcat
Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
Last updated
Was this helpful?

