Elasticsearchをインストールした。
参考にしたページ
- Getting Started [7.13] » Getting started with the Elastic Stack
- Elasticsearch Guide [7.13] » Set up Elasticsearch » Installing Elasticsearch
- Elasticsearch Guide [7.13] » Set up Elasticsearch » Installing Elasticsearch » Install Elasticsearch with RPM
- Elasticsearchのダウンロードページ
インストール手順
- GPG鍵のインポート
- Elasticsearchがパッケージに署名する鍵の公開鍵をインポートする。
$ sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
- インストール
$ curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.13.0-x86_64.rpm $ sudo rpm -ivh elasticsearch-7.13.0-x86_64.rpm
Verifying... ################################# [100%]
準備しています... ################################# [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
更新中 / インストール中...
1:elasticsearch-0:7.13.0-1 ################################# [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch/elasticsearch.keystore
[/usr/lib/tmpfiles.d/elasticsearch.conf:1] Line references path below legacy directory /var/run/, updating /var/run/elasticsearch → /run/elasticsearch; please update the tmpfiles.d/ drop-in file accordingly.
- Elasticsearchの起動、停止
$ sudo systemctl start elasticsearch.service$ sudo systemctl stop elasticsearch.service
- Elasticsearchの自動起動
- Elasticsearchは、インストール後に自動で起動しない。
- システム起動時にElasticsearchが自動起動するように設定する。
$ sudo systemctl daemon-reload $ sudo systemctl enable elasticsearch.service
Synchronizing state of elasticsearch.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink /etc/systemd/system/multi-user.target.wants/elasticsearch.service → /usr/lib/systemd/system/elasticsearch.service.
- Elasticsearchの動作確認
- ローカルホストの9200番ポートにHTTPリクエストを送信することで、Elasticsearchノードが動作していることを確認できる。
$ curl -X GET "localhost:9200/?pretty"
{
"name" : "host_name",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "xxxxxxxxxxxxxxxxxxxxxxxx",
"version" : {
"number" : "7.12.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "3186837139b9c6b6d23c3200870651f10d3343b7",
"build_date" : "2021-04-20T20:56:39.040728659Z",
"build_snapshot" : false,
"lucene_version" : "8.8.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
{
"name" : "host_name",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "xxxxxxxxxxxxxxxxxxxxxxxx",
"version" : {
"number" : "7.12.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "3186837139b9c6b6d23c3200870651f10d3343b7",
"build_date" : "2021-04-20T20:56:39.040728659Z",
"build_snapshot" : false,
"lucene_version" : "8.8.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
- Logstashは、強力なデータ解析および変換機能を追加するが、通常は必須ではない。
- セキュリティの実装は割愛されているので、ネットワークを介して機密データを送信する場合は、Elastic Stackを保護し、暗号化された通信を有効にする必要がある。
- 一部の商用機能は、自動的にインデックスを作成する。Elasticsearchは、デフォルトでインデックスの自動作成が許可されている。LogstashやBeatを使用してるいてる場合は、
action.auto_create_indexに追加のインデックス名が必要になる可能性が高く、正確な値はローカル構成によって異なる。利用環境の正しい値がわからない場合は、すべてのインデックスの自動作成を許可するようにする。elasticsearch.ymlの
関連するページ
- Elasticsearch Guide [7.13] » Set up Elasticsearch » Configuring Elasticsearch
- Elasticsearch Guide [7.13] » Secure the Elastic Stack
- Elasticsearch Guide [7.13] » Secure the Elastic Stack » Configure security for the Elastic Stack
0 件のコメント:
コメントを投稿