Introduction
This document provides a comprehensive guide on installing and configuring Elasticsearch on a Ubuntu environment. The instructions cover the installation process, configuration settings, and integration with the OvalEdge (OE) application.
Prerequisites
- The user must have Admin access to the server
- Elasticsearch port 9200 should be enabled
Elasticsearch Server Installation
Step#1: Install APT Transport Package
- Install the APT transport package to enable access to repositories via HTTPS:
Sample screenshot
Step#2: Update Elasticsearch Repository
- Update the Elasticsearch repository and import the GPG key:
Step#3: Install Elasticsearch
- Install Elasticsearch using APT:
Sample screenshot
Step#4: Reload and Start Elasticsearch Service
- Reload the daemon service and enable/start the Elasticsearch service.
Sample screenshot
Step#5: Check Elasticsearch Status
- Check the status of Elasticsearch.
Sample screenshot
Configuring Elasticsearch
Step#6: Edit elasticsearch.yaml
- Edit the Elasticsearch configuration file to customize settings.
- Add the following lines at the bottom of the file:
Sample screenshot
Step#7: Set Up JVM_HEAP
- Uncomment the JVM parameters mentioned in the settings below to restrict Elasticsearch memory usage. Copy the jvm.options file to the jvm.options.d folder and set values:
Sample Screenshot
- Set the values:
Note: Once the above parameters are updated in elasticsearch.yaml file, then restart the Elasticsearch service and follow the below steps:
Step# 8: Set Up Elastic User Password
- Navigate to the Elasticsearch bin directory and set up a password for the Elastic user:
After running the command, type 'Y' and enter the password for Elasticsearch. Repeat the same password when prompted multiple times.
Sample screenshot
Step#9: Check Elasticsearch Web Response
- Check the web response of Elasticsearch:
Sample screenshot
Integrating Elasticsearch with OvalEdge
Step#10: Edit Oasis Properties
- Edit the Oasis properties file in the OE application running on the server:
- Update Elasticsearch details:
Note: The password was set during the Elasticsearch installation.
Sample screenshot
Step#11: Restart Tomcat
- After editing the Elasticsearch details in the Oasis properties, restart Tomcat.
Upgrade Elasticsearch
Pre-Upgrade Steps
- Login to the Elasticsearch Server:
- Access the server with the necessary user permissions.
- Check the Current Elasticsearch Version:
- Run the following command to verify the current version of Elasticsearch:
curl -u <user>:<password> http://localhost:9200
- Run the following command to verify the current version of Elasticsearch:
- Stop the Elasticsearch Service:
- Use the following command to stop the Elasticsearch service:
sudo systemctl stop elasticsearch
- Use the following command to stop the Elasticsearch service:
Upgrade Elasticsearch
- Install the Updated Elasticsearch Package:
- Run the following command to upgrade Elasticsearch:
sudo apt install elasticsearch
- Run the following command to upgrade Elasticsearch:
- Reload Systemd Daemon:
- After the upgrade, reload the systemd daemon to ensure the service configurations are updated:
sudo systemctl daemon-reload
- After the upgrade, reload the systemd daemon to ensure the service configurations are updated:
- Start the Elasticsearch Service:
- Start the upgraded Elasticsearch service:
sudo systemctl start elasticsearch
- Start the upgraded Elasticsearch service:
Post-Upgrade Steps
- Verify the Elasticsearch Version:
- Confirm that the upgrade was successful by checking the Elasticsearch version:
curl -u <user>:<password> http://localhost:9200
- Confirm that the upgrade was successful by checking the Elasticsearch version:
This guide ensures a smooth upgrade process for Elasticsearch on Linux.
Copyright © 2024, OvalEdge LLC, Peachtree Corners, GA USA