So i was looking to install OpenSearch for my localhost Magento2 installation, but i could only find install methods for using Docker..
I’m not using Docker for a few reasons, that have to do with the company i’m at right now, but i would really like to just install OpenSearch on my own computer locally, and run it locally, not using other programs like Docker, is that even possible?
BTW; i’m on Ubuntu 22.04 and Magento 2.4.6 (if thats even important to know lol)
Thanks in advance!
2
Answers
OpenSearch documentation provides at least a couple ways to install it without docker. I will list two of the methods below to avoid copy pasting whole documentation.
Using tarball (aka download archive, extract it and run)
Step 1: Download and unpack OpenSearch
Extract the contents of the tarball.
Step 2: Configure important system settings
Disable memory paging and swapping performance on the host to improve performance.
Increase the number of memory maps available to OpenSearch.
Reload the kernel parameters using sysctl and verify that the change was applied by checking the value
Step 3: Run OpenSearch
From an APT repository
Install the necessary packages.
Import the public GPG key. This key is used to verify that the APT repository is signed.
Create an APT repository for OpenSearch:
Verify that the repository was created successfully.
With the repository information added, list all available versions of OpenSearch:
Choose the version of OpenSearch you want to install:
To install a specific version of OpenSearch:
Once complete, enable OpenSearch.
Start OpenSearch.
To verify that OpenSearch installed correctly.
Send a request to port 9200:
You should get a response that looks like this:
As Magento2 latest version supports the 2.5.0 version only, so I will be sharing the steps to install that from the APT repository directly. In this all the steps are copied from the official documentation:
Install OpenSearch from an APT repository
APT, the primary package management tool for Debian–based operating systems, allows you to download and install the Debian package from the APT repository.
Step 1: Install the necessary packages.
Step 2: Import the public GPG key. This key is used to verify that the APT repository is signed.
Step 3: Create an APT repository for OpenSearch:
Step 4: Verify that the repository was created successfully.
Step 5: With the repository information added, list all available versions of OpenSearch:
Step 6: Choose the version of OpenSearch you want to install:
Step 6.1 : Unless otherwise indicated, the latest available version of OpenSearch is installed.
Step 6.2 : To install a specific version of OpenSearch:
Once complete, enable OpenSearch.
Start OpenSearch.
Verify that OpenSearch launched correctly.
Test OpenSearch
Query the plugins endpoint: