How to Install OpenSearch on Ubuntu 24.04

 

How to Install OpenSearch on Ubuntu 24.04

Introduction

OpenSearch is a community-driven, open-source search and analytics suite. In this guide, you will learn how to install OpenSearch on Ubuntu 24.04.

Prerequisites

  • Ubuntu 24.04 installed
  • Access to a terminal/command line
  • sudo privileges

Step 1: Install Java Runtime

OpenSearch requires Java. You can install OpenJDK using the following command:

sudo apt update
sudo apt install openjdk-11-jdk

Verify Java Installation

To ensure Java is installed correctly, run:

java -version

Step 2: Add OpenSearch GPG Key

Next, you need to add the OpenSearch GPG Key to your system:

wget -qO - https://artifacts.opensearch.org/GPG-KEY | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/opensearch.gpg

Step 3: Add OpenSearch Repository

Add the OpenSearch repository to your sources list:

echo "deb https://artifacts.opensearch.org/packages/opensearch-2.x/apt/ stable main" | sudo tee /etc/apt/sources.list.d/opensearch.list

Step 4: Install OpenSearch

After adding the repository, update the package list and install OpenSearch:

sudo apt update
sudo apt install opensearch

Step 5: Configure OpenSearch

You can configure OpenSearch by editing the configuration file located at /etc/opensearch/opensearch.yml. Use your preferred text editor (e.g., nano or vim):

sudo nano /etc/opensearch/opensearch.yml

Step 6: Start OpenSearch

Start the OpenSearch service with the following command:

sudo systemctl start opensearch

Enable OpenSearch on Boot

To ensure OpenSearch starts automatically on boot, run:

sudo systemctl enable opensearch

Step 7: Verify Installation

You can verify that OpenSearch is running by checking the service status:

sudo systemctl status opensearch

Conclusion

You have successfully installed OpenSearch on your Ubuntu 24.04 system. You can now access it through its REST API or integrate it into your applications.

Resources

  • 0 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...