{"id":12494,"date":"2024-05-28T13:19:05","date_gmt":"2024-05-28T07:49:05","guid":{"rendered":"https:\/\/www.skynats.com\/?p=12494"},"modified":"2025-01-08T20:36:15","modified_gmt":"2025-01-08T15:06:15","slug":"how-to-install-of-opensearch-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-install-of-opensearch-on-ubuntu-22-04\/","title":{"rendered":"How to Install OpenSearch On Ubuntu 22.04"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">OpenSearch is an open-source search and analytics package that allows users to do advanced search operations and data analysis on large volumes of data. It is capable of full-text search, structured search, and analytics queries. It is a popular choice for enterprises that require powerful data search capabilities and real-time analytics due to its robust, scalable, and secure solution, developed by Amazon Web Services (AWS).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s look at the steps involved in installing <a href=\"https:\/\/www.skynats.com\/server-management\/\">OpenSearch on Ubuntu 22.04<\/a> server<a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\">.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-normal-font-size\">Step-1  Add repository for OpenSearch<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The OpenSearch package is not included in the default repository of Ubuntu 22.04 server. So you&#8217;ll have to manually add it to your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Install the necessary requirements first using below command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt -y install curl lsb-release gnupg2 ca-certificates<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. In next step, import the GPG key for opensearch packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/artifacts.opensearch.org\/publickeys\/opensearch.pgp| gpg --dearmor -o \/etc\/apt\/trusted.gpg.d\/opensearch.gpg<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3. Add the APT repository to the server using below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb https:\/\/artifacts.opensearch.org\/releases\/bundle\/opensearch\/2.x\/apt stable main\" | tee \/etc\/apt\/sources.list.d\/opensearch-2.x.list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4. Update the package lists using the command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-normal-font-size\">Step-2  Installation and Configuration of OpenSearch<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. Use the command to list all available OpenSearch versions in the repository<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt list -a opensearch<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output will be as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"710\" height=\"259\" sizes=\"(max-width: 710px) 100vw, 710px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-list.png\" alt=\"OpenSearch list\" class=\"wp-image-12495\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-list.png 710w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-list-300x109.png 300w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2. Install latest available version using the command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install opensearch<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To install the specific version as required from the list, use the command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install opensearch=&lt;version&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change &lt;version&gt; with specific version you need to install,For example<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install opensearch=2.10.0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3. Next step is to edit the configuration file opensearch.yml<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Default configuration file for it is located in the \/etc\/opensearch\/opensearch.yml <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the parameters as per your requirements using vim\/nano command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/opensearch\/opensearch.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change the values as shown below and save the configuration file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"410\" height=\"204\" sizes=\"(max-width: 410px) 100vw, 410px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opparameters.png\" alt=\"Opparameters\" class=\"wp-image-12496\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opparameters.png 410w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opparameters-300x149.png 300w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4. Restart the OpenSearch service to apply the changes and check the status.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart opensearch\nsystemctl enable --now opensearch\nsystemctl status opensearch<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output will be as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"112\" sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-status-1024x112.png\" alt=\"OpenSearch-status\" class=\"wp-image-12497\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-status-1024x112.png 1024w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-status-300x33.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-status-768x84.png 768w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-status-1200x131.png 1200w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-status.png 1356w\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading has-normal-font-size\">Step-3  Verify the Installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the curl command to test whether the it is working correctly on the server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -X GET https:\/\/localhost:9200<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output will be as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"239\" sizes=\"(max-width: 620px) 100vw, 620px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-version.png\" alt=\"OpenSearch version\" class=\"wp-image-12498\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-version.png 620w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/05\/opensearch-version-300x116.png 300w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Using this method detailed above, you can simply install it on Ubuntu22.04 server.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you encounter any issues during the installation of OpenSearch on Ubuntu 22.04 or need professional assistance, consider reaching out to <a href=\"https:\/\/www.skynats.com\/blog\/\">Skynats<\/a>. Our team of experts is ready to help you with personalized support and services to ensure whether its setup is running smoothly and efficiently. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenSearch is an open-source search and analytics package that allows users to do advanced search operations and data analysis on large volumes of data. It is capable of full-text search, structured search, and analytics queries. It is a popular choice for enterprises that require powerful data search capabilities and real-time analytics due to its robust, [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[762,5],"tags":[868,828],"class_list":["post-12494","post","type-post","status-publish","format-standard","hentry","category-ubuntu-22-04","category-blog","tag-opensearch","tag-ubuntu-22-04"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/12494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=12494"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/12494\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=12494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=12494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=12494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}