> For the complete documentation index, see [llms.txt](https://docs.ovaledge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ovaledge.com/deployment-and-maintenance/installation/elasticsearch-9.x-on-rhel.md).

# 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:

   ```
   sudo dnf install -y elasticsearch
   ```

   \
   Or

   ```
   sudo yum install -y elasticsearch
   ```

### Configure Elasticsearch

1. Open the Elasticsearch configuration file:

   ```
   sudo vi /etc/elasticsearch/elasticsearch.yml
   ```
2. Update the following configuration properties:

   ```
   cluster.name: ovaledge
   network.host: 0.0.0.0
   transport.host: localhost
   transport.tcp.port: 9300
   http.port: 9200
   ```

### Enable and Start the Elasticsearch Service

1. Reload the systemd manager configuration:

   ```
   sudo systemctl daemon-reexec
   ```
2. Enable Elasticsearch to start automatically during system boot:

   ```
   sudo systemctl enable elasticsearch
   ```
3. Start the Elasticsearch service:

   ```
   sudo systemctl start elasticsearch
   ```
4. Verify the service status:

   ```
   sudo systemctl status elasticsearch.service
   ```

   \
   Sample Reference Screenshot:

   <figure><img src="https://content.gitbook.com/content/gnJyYKHzsnoFOdZJtHsc/blobs/8UkaZ3iSs1BDw7l6SnaK/unknown.png" alt=""><figcaption></figcaption></figure>

### Enable Security and Set the Password

1. Open the Elasticsearch configuration file:

   ```
   sudo vi /etc/elasticsearch/elasticsearch.yml
   ```
2. Add the following property:

   ```
   xpack.security.enabled: true
   ```
3. Restart the Elasticsearch service:

   ```
   sudo systemctl restart elasticsearch
   ```
4. Run the following command to reset the password for the elastic user:

   ```
   sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
   ```
5. Enter and confirm the password when prompted.

### Verify the Installation

1. Access Elasticsearch using the following URL:

   ```
   http://<IP>:9200
   ```
2. Confirm that Elasticsearch is running and responding.&#x20;

***

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ovaledge.com/deployment-and-maintenance/installation/elasticsearch-9.x-on-rhel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
