Elasticsearch is an open-source search and analytic engine used to add search functionality to web-based applications. It is capable of searching and analyzing a large amount of data. It is powerful, stable, scalable, and supports RESTful with an HTTP URI to manipulate data. It is based on the Lucene library, written in Java, and is dual-licensed under the source-available Server Side Public License and the Elastic license. It has the ability to index many types of content including, a website search, application search, security analytics, enterprise search, geospatial data analysis and visualization, and more.

In this post, we will show you how to install and configure Elasticsearch on OracleLinux 10.

Step 1 – Install Java

Elasticsearch is a Java-based application, so you will need to install Java on your server. You can install it by running the following commands:

dnf update -y
dnf install java-21-openjdk-devel -y

Once Java is installed, verify the Java version using the following command:

java --version

Sample output:

java --version
openjdk 21.0.9 2025-10-21 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.9.0.10-1.0.1) (build 21.0.9+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.9.0.10-1.0.1) (build 21.0.9+10-LTS, mixed mode, sharing)

Step 2 – Create Elasticsearch Repository

By default, Elasticsearch is not included in the OracleLinux 10 default repository, so you will need to create a repository for it.

First, download and import the GPG key with the following command:

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

Next, create an Elasticsearch repo with the following command:

nano /etc/yum.repos.d/elasticsearch.repo

Add the following lines:

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

Save and close the file when you are finished.

Step 3 – Install and Configure Elasticsearch

After creating an ElasticSearch repo, install the Elasticsearch package with the following command:

dnf install elasticsearch -y

After installing Elasticsearch, edit the Elasticsearch main configuration file:

nano /etc/elasticsearch/elasticsearch.yml

Change the following lines:

cluster.name: my-cluster
node.name: oracle

# Data paths
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

# Bind locally for testing
network.host: 127.0.0.1
http.port: 9200

xpack.security.enabled: true
xpack.security.http.ssl.enabled: false

#cluster.initial_master_nodes: ["oracle"]

Save and close the file, then start the Elasticsearch service and enable it to start at system reboot:

systemctl start elasticsearch
systemctl enable elasticsearch

You can also check the status of Elasticsearch with the following command:

systemctl status elasticsearch

You should get the following output:

ā— elasticsearch.service - Elasticsearch
     Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; preset: disabled)
     Active: active (running) since Thu 2025-12-04 22:33:09 EST; 6s ago
 Invocation: 268d1c8a0340493b903bd594982d6ef5
       Docs: https://www.elastic.co
   Main PID: 58459 (java)
      Tasks: 107 (limit: 24812)
     Memory: 2.4G (peak: 2.4G)
        CPU: 40.050s
     CGroup: /system.slice/elasticsearch.service
             ā”œā”€58459 /usr/share/elasticsearch/jdk/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=/usr/share/elasticsearch/bin/elasticsearch -Dcli.libs=lib/too>
             ā”œā”€58519 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=tr>
             └─58539 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

Dec 04 22:32:41 oracle systemd[1]: Starting elasticsearch.service - Elasticsearch...
Dec 04 22:33:09 oracle systemd[1]: Started elasticsearch.service - Elasticsearch.

Step 4 – How to Use Elasticsearch

At this point, ElasticSearch is installed and running. Now, we will need to reset the Elasticsearch default password to test the Elasticsearch functionality.

Run the following command to reset the password.

/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic --url http://localhost:9200

You should see the following output:

This tool will reset the password of the [elastic] user to an autogenerated value.
The password will be printed in the console.
Please confirm that you would like to continue [y/N]y


Password for the [elastic] user successfully reset.
New value: i3EDZtY*6zK7fe*ZIovE

Now, run the following command to test the Elasticsearch API using the password:

curl -X GET 'http://localhost:9200' -u elastic

Sample output:

Enter host password for user 'elastic':
{
  "name" : "oracle",
  "cluster_name" : "my-application",
  "cluster_uuid" : "TrgZPfVGSZyP64fkf0E9Dw",
  "version" : {
    "number" : "8.19.8",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "e34ace04b64e9bfa3f9e785b08e6d81f8efe314b",
    "build_date" : "2025-11-26T23:06:12.342148294Z",
    "build_snapshot" : false,
    "lucene_version" : "9.12.2",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

Conclusion

In the above guide, we explained how to install and use Elasticsearch on OracleLinux 10. You can now use Elasticsearch with your application to search and analyze data. Give it a try on your dedicated server from Atlantic.Net!