Elasticsearch 9.x on RHEL

This article describes the steps required to install and configure Elasticsearch on a Red Hat Enterprise Linux (RHEL) server for use with OvalEdge. It includes repository configuration, package installation, service management, and security configuration. Follow the steps in the order provided to ensure a successful installation.

Prerequisites

Before starting the installation, ensure the following prerequisites are met:

  • A supported Red Hat Enterprise Linux (RHEL) server is available.

  • Java is installed on the server.

  • Root or sudo access is available.

  • Internet access is available to download the Elasticsearch packages.

  • Required ports are open:

    • 9200 for HTTP communication

    • 9300 for transport communication

Install Elasticsearch GPG Key

  1. Import the Elasticsearch GPG key:

    sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Add the Elasticsearch Repository

  1. Create the Elasticsearch repository file:

    sudo vi /etc/yum.repos.d/elasticsearch.repo
  2. Add the following content to the repository file:

    [elasticsearch]
    name=Elasticsearch repository
    baseurl=https://artifacts.elastic.co/packages/9.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md

Install Elasticsearch

  1. Install Elasticsearch using one of the following commands:

    Or

Configure Elasticsearch

  1. Open the Elasticsearch configuration file:

  2. Update the following configuration properties:

Enable and Start the Elasticsearch Service

  1. Reload the systemd manager configuration:

  2. Enable Elasticsearch to start automatically during system boot:

  3. Start the Elasticsearch service:

  4. Verify the service status:

    Sample Reference Screenshot:

Enable Security and Set the Password

  1. Open the Elasticsearch configuration file:

  2. Add the following property:

  3. Restart the Elasticsearch service:

  4. Run the following command to reset the password for the elastic user:

  5. Enter and confirm the password when prompted.

Verify the Installation

  1. Access Elasticsearch using the following URL:

  2. Confirm that Elasticsearch is running and responding.


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

Last updated

Was this helpful?