Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RPM installation instructions #532

Merged
merged 12 commits into from
May 3, 2022
157 changes: 157 additions & 0 deletions _opensearch/install/rpm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
layout: default
title: RPM
parent: Install OpenSearch
nav_order: 51
---

# RPM

The RPM Package Manager (RPM) installation provides everything you need to run OpenSearch inside Red Hat or Red Hat-based Linux Distributions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hyphen in "Hat-based" should technically be an en dash ("Hat–based"), as it applies to both words in the proper noun, but we can't hyphenate the proper noun. Also, please lowercase "distributions."


RPM supports CentOS 7 and 8, and Amazon Linux 2. If you have your own Java installation and set `JAVA_HOME` in your terminal application, macOS works, as well.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comma following "8" and the comma following "works".


There are two methods for installing OpenSearch on RPM:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the colon here should actually be a period, as the sentence does not directly introduce a list but rather introduces a heading. Or it might even be better to provide the two methods after the colon ("There are two methods for installing OpenSearch on RPM: manually or by using YUM.").


## Manual method


1. Download the RPM package directly from the [OpenSearch downloads page](https://opensearch.org/downloads.html){:target='\_blank'}. The RPM package can be download both as `x64` and `arm64`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the second instance of "download" to "downloaded".


Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
2. Import the public GPG key. This key verifies that the your OpenSearch instance is signed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we define "GPG"? Please delete "the" in the second sentence (should just be "that your OpenSearch".


```bash
sudo rpm --import https://artifacts.opensearch.org/publickeys/opensearch.pgp
```

3. On your host, use `sudo yum install` or `sudo rpm -ivh` to install the package.

**x64**

```bash
sudo yum install opensearch-{{site.opensearch_version}}-linux-x64.rpm
sudo yum install opensearch-dashboards-{{site.opensearch_version}}-linux-x64.rpm
```

```bash
sudo rpm -ivh opensearch-{{site.opensearch_version}}-linux-x64.rpm
sudo rpm -ivh opensearch-dashboards-{{site.opensearch_version}}-linux-x64.rpm
```

**arm64**

```bash
sudo yum install opensearch-{{site.opensearch_version}}-linux-x64.rpm
sudo yum install opensearch-dashboards-{{site.opensearch_version}}-linux-arm64.rpm
```

```bash
sudo rpm -ivh opensearch-{{site.opensearch_version}}-linux-x64.rpm
sudo rpm -ivh opensearch-dashboards-{{site.opensearch_version}}-linux-arm64.rpm
```

Once complete, you can run OpenSearch inside your distribution.

## YUM method

YUM, an RPM package management tool, allows you to pull the RPM package from the YUM repository library.

1. Create a repository file for both OpenSearch and OpenSearch Dashboards:

```bash
sudo curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/opensearch-{{site.opensearch_version}}.repo -o /etc/yum.repos.d/{{site.opensearch_version}}.repo
```

```bash
sudo curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/{{site.opensearch_version}}/opensearch-dashboards-{{site.opensearch_version}}.repo -o /etc/yum.repos.d/{{site.opensearch_version}}.repo
```

To verify that the repos appear in your repo list, use `sudo yum repolist`.

2. Clean your YUM cache, to ensure a smooth installation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comma following "cache".


```bash
sudo yum clean all
```

3. With the repository file downloaded, list all available versions of OpenSearch:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest changing "repository" to "repo," as you switched to this usage in the last instance.


```bash
sudo yum list | grep opensearch
```

4. Chose the version of OpenSearch you want to install:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```bash
sudo yum install opensearch
sudo yum install opensearch-dashboards
```

Unless otherwise indicated, the highest minor version of OpenSearch installs.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

To install a specific version of OpenSearch:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a complete sentence?


```bash
sudo yum install 'opensearch-{{site.opensearch_version}}'
```

5. During installation, the installer stops to see if the GPG key matches the OpenSearch project. Verify that the `Fingerprint` matches the following:

```bash
Fingerprint: c5b7 4989 65ef d1c2 924b a9d5 39d3 1987 9310 d3fc
```

If correct, enter `yes` or `y`. The OpenSearch installation continues.

Once complete, you can run OpenSearch inside your distribution.

## Run OpenSearch

1. Run OpenSearch and OpenSearch Dashboards using `systemctl`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this step should end in a colon rather than a period.


```bash
sudo systemctl start opensearch.service
sudo systemctl start opensearch-dashboards.service
```

2. Send requests to the server to verify that OpenSearch is running:

```bash
curl -XGET https://localhost:9200 -u 'admin:admin' --insecure
curl -XGET https://localhost:9200/_cat/config?v -u 'admin:admin' --insecure
```

3. To stop running OpenSearch, enter:

```bash
sudo systemctl stop opensearch.service
sudo systemctl stop opensearch-dashboards.service
```


## *(Optional)* Set up Performance Analyzer

When enabled, the Performance Analyzer plugin collects data related to the performance of your OpenSearch instance. To start the Performance Analyzer plugin, enter:

```bash
sudo systemctl start opensearch-performance-analyzer.service
```

To stop the Performance Analyzer, enter:

```bash
sudo systemctl stop opensearch-performance-analyzer.service
```

## Upgrade RPM

You can upgrade your RPM OpenSearch instance both manually and through YUM.


### Manual

Download the new version of OpenSearch you want to use, and then use `rmp -Uvh` to upgrade.

### YUM

To upgrade to the latest version of OpenSearch with YUM, use `sudo yum update`. You can also upgrade to a specific OpenSearch version by using `sudo yum upgrade opensearch-<version-number>`.
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved