Fix formatting

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
This commit is contained in:
Naarcha-AWS 2022-05-03 11:53:30 -05:00
parent 6f2b8b90c3
commit 64741ac258
1 changed files with 103 additions and 101 deletions

View File

@ -5,6 +5,8 @@ parent: Install OpenSearch
nav_order: 51 nav_order: 51
--- ---
# RPM
The RPM Package Manager (RPM) installation provides everything you need to run OpenSearch inside Red Hat or CentOS Linux distributions. The RPM Package Manager (RPM) installation provides everything you need to run OpenSearch inside Red Hat or CentOS Linux 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. 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.
@ -18,31 +20,31 @@ There are two methods for installing OpenSearch on RPM:
2. On your host, use `yum install` or `rpm -ivh` to install the package. We recommend using `yum install`, so that the required dependecies can be pulled from the YUM library. 2. On your host, use `yum install` or `rpm -ivh` to install the package. We recommend using `yum install`, so that the required dependecies can be pulled from the YUM library.
```bash ```bash
yum install opensearch-{{site.opensearch_version}}-linux-x64.rpm yum install opensearch-{{site.opensearch_version}}-linux-x64.rpm
yum install opensearch-dashboards-{{site.opensearch_version}}-linux-x64.rpm yum install opensearch-dashboards-{{site.opensearch_version}}-linux-x64.rpm
``` ```
```bash ```bash
rpm -ivh opensearch-{{site.opensearch_version}}-linux-x64.rpm rpm -ivh opensearch-{{site.opensearch_version}}-linux-x64.rpm
rpm -ivh opensearch-dashboards-{{site.opensearch_version}}-linux-x64.rpm rpm -ivh opensearch-dashboards-{{site.opensearch_version}}-linux-x64.rpm
``` ```
3. Run OpenSearch and OpenSearch Dashboards using `systemctl`. 3. Run OpenSearch and OpenSearch Dashboards using `systemctl`.
```bash ```bash
systemctl start opensearch systemctl start opensearch
systemctl start opensearch-dashboards systemctl start opensearch-dashboards
``` ```
If you configure the security plugin for production use (or disable it), you can run OpenSearch using `./bin/opensearch`. If you configure the security plugin for production use (or disable it), you can run OpenSearch using `./bin/opensearch`.
4. Open a second terminal session, and send requests to the server to verify that OpenSearch is running: 4. Open a second terminal session, and send requests to the server to verify that OpenSearch is running:
```bash ```bash
curl -XGET https://localhost:9200 -u 'admin:admin' --insecure curl -XGET https://localhost:9200 -u 'admin:admin' --insecure
curl -XGET https://localhost:9200/_cat/plugins?v -u 'admin:admin' --insecure curl -XGET https://localhost:9200/_cat/plugins?v -u 'admin:admin' --insecure
``` ```
## YUM method ## YUM method
@ -50,77 +52,77 @@ YUM allows you to pull the RPM package from the YUM repository library.
1. Create a repository file for both OpenSearch and OpenSearch dashboards: 1. Create a repository file for both OpenSearch and OpenSearch dashboards:
```curl ```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 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
``` ```
```curl ```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 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
``` ```
2. Navigate to your YUM repository directory: 2. Navigate to your YUM repository directory:
```bash ```bash
cd /etc/yum.repos.d/ cd /etc/yum.repos.d/
``` ```
3. Clean your YUM cache, to ensure a smooth installation: 3. Clean your YUM cache, to ensure a smooth installation:
```bash ```bash
sudo yum clean all sudo yum clean all
``` ```
4. With the repository file downloaded, list all available versions of OpenSearch: 4. With the repository file downloaded, list all available versions of OpenSearch:
```curl ```bash
sudo yum list | grep opensearch sudo yum list | grep opensearch
``` ```
5. Chose the version of OpenSearch you want to install: 5. Chose the version of OpenSearch you want to install:
```bash ```bash
yum install opensearch yum install opensearch
yum install opensearch-dashboards yum install opensearch-dashboards
``` ```
Unless otherwise indicated, the highest minor version of OpenSearch installs. Unless otherwise indicated, the highest minor version of OpenSearch installs.
To install a specific version of OpenSearch To install a specific version of OpenSearch
```bash ```bash
yum install 'opensearch-{{site.opensearch_version}}' yum install 'opensearch-{{site.opensearch_version}}'
``` ```
6. During installation, the installer stops to see if the GPG key matches the OpenSearch project. Verify that the `Fingerprint` matches the following: 6. 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 Fingerprint: c5b7 4989 65ef d1c2 924b a9d5 39d3 1987 9310 d3fc
``` ```
If correct, enter `yes`. The OpenSearch installation continues. If correct, enter `yes`. The OpenSearch installation continues.
7. Run OpenSearch and OpenSearch Dashboards using `systemctl`. 7. Run OpenSearch and OpenSearch Dashboards using `systemctl`.
```bash ```bash
systemctl start opensearch.service systemctl start opensearch.service
systemctl start opensearch-dashboards.service systemctl start opensearch-dashboards.service
``` ```
If you configure the security plugin for production use (or disable it), you can run OpenSearch using `./bin/opensearch`. If you configure the security plugin for production use (or disable it), you can run OpenSearch using `./bin/opensearch`.
8. Open a second terminal session, and send requests to the server to verify that OpenSearch is running: 8. Open a second terminal session, and send requests to the server to verify that OpenSearch is running:
```bash ```bash
curl -XGET https://localhost:9200 -u 'admin:admin' --insecure curl -XGET https://localhost:9200 -u 'admin:admin' --insecure
curl -XGET https://localhost:9200/_cat/plugins?v -u 'admin:admin' --insecure curl -XGET https://localhost:9200/_cat/plugins?v -u 'admin:admin' --insecure
``` ```
To stop running OpenSearch, enter: To stop running OpenSearch, enter:
```bash ```bash
systemctl stop opensearch.service systemctl stop opensearch.service
systemctl stop opensearch-dashboards.service systemctl stop opensearch-dashboards.service
``` ```
## (Optional) Set up Performance Analyzer ## (Optional) Set up Performance Analyzer
@ -129,71 +131,71 @@ When enabled, the Performance Analyzer plugin collects data related to the perfo
1. Make Performance Analyzer accessible outside of the host machine 1. Make Performance Analyzer accessible outside of the host machine
```bash ```bash
cd /usr/share/opensearch # navigate to the OpenSearch home directory cd /usr/share/opensearch # navigate to the OpenSearch home directory
cd plugins/opensearch_performance_analyzer/pa_config/ cd plugins/opensearch_performance_analyzer/pa_config/
vi performance-analyzer.properties vi performance-analyzer.properties
``` ```
Uncomment the line `#webservice-bind-host` and set it to `0.0.0.0`: Uncomment the line `#webservice-bind-host` and set it to `0.0.0.0`:
``` ```
# ======================== OpenSearch performance analyzer plugin config ========================= # ======================== OpenSearch performance analyzer plugin config =========================
# NOTE: this is an example for Linux. Please modify the config accordingly if you are using it under other OS. # NOTE: this is an example for Linux. Please modify the config accordingly if you are using it under other OS.
# WebService bind host; default to all interfaces # WebService bind host; default to all interfaces
webservice-bind-host = 0.0.0.0 webservice-bind-host = 0.0.0.0
# Metrics data location # Metrics data location
metrics-location = /dev/shm/performanceanalyzer/ metrics-location = /dev/shm/performanceanalyzer/
# Metrics deletion interval (minutes) for metrics data. # Metrics deletion interval (minutes) for metrics data.
# Interval should be between 1 to 60. # Interval should be between 1 to 60.
metrics-deletion-interval = 1 metrics-deletion-interval = 1
# If set to true, the system cleans up the files behind it. So at any point, we should expect only 2 # If set to true, the system cleans up the files behind it. So at any point, we should expect only 2
# metrics-db-file-prefix-path files. If set to false, no files are cleaned up. This can be useful, if you are archiving # metrics-db-file-prefix-path files. If set to false, no files are cleaned up. This can be useful, if you are archiving
# the files and wouldn't like for them to be cleaned up. # the files and wouldn't like for them to be cleaned up.
cleanup-metrics-db-files = true cleanup-metrics-db-files = true
# WebService exposed by App's port # WebService exposed by App's port
webservice-listener-port = 9600 webservice-listener-port = 9600
# Metric DB File Prefix Path location # Metric DB File Prefix Path location
metrics-db-file-prefix-path = /tmp/metricsdb_ metrics-db-file-prefix-path = /tmp/metricsdb_
https-enabled = false https-enabled = false
#Setup the correct path for certificates #Setup the correct path for certificates
certificate-file-path = specify_path certificate-file-path = specify_path
private-key-file-path = specify_path private-key-file-path = specify_path
# Plugin Stats Metadata file name, expected to be in the same location # Plugin Stats Metadata file name, expected to be in the same location
plugin-stats-metadata = plugin-stats-metadata plugin-stats-metadata = plugin-stats-metadata
# Agent Stats Metadata file name, expected to be in the same location # Agent Stats Metadata file name, expected to be in the same location
agent-stats-metadata = agent-stats-metadata agent-stats-metadata = agent-stats-metadata
``` ```
2. Restart the OpenSearch service: 2. Restart the OpenSearch service:
```bash ```bash
systemctl restart opensearch.service systemctl restart opensearch.service
``` ```
3. After OpenSearch is running, start the Performance Analyzer plugin: 3. After OpenSearch is running, start the Performance Analyzer plugin:
```bash ```bash
sudo systemctl start opensearch-performance-analyzer.service sudo systemctl start opensearch-performance-analyzer.service
``` ```
To stop the Performance Analyzer, enter: To stop the Performance Analyzer, enter:
``` ```bash
sudo systemctl stop opensearch-performance-analyzer.service sudo systemctl stop opensearch-performance-analyzer.service
``` ```
## Upgrade RPM ## Upgrade RPM