LoginSignup
0
0

More than 1 year has passed since last update.

4-Elasticsearchのインストール及び設定(パッケージインストール)

Last updated at Posted at 2018-05-12

はてなブログに投稿しました。

はじめに

RHEL7.3にElasticsearchをインストールと設定を実施する流れです。 RPMでのインストールになります。

Elasticsearchのインストール

(1)パッケージを入手します。

# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.rpm

(2)インストールを実施します。

# rpm --install elasticsearch-6.2.2.rpm

※勝手に起動されると困るので、サービス自動起動設定はここではしません。

日本語パッケージのインストール

ICU Analysis plugin

(1)パッケージを入手します。

# wget https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-6.2.2.zip

(2)インストールを実施します。

# /usr/share/elasticsearch/bin/elasticsearch-plugin install file:///root/analysis-icu-6.2.2.zip

※オンラインインストールもできます。

# /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu

kuromoji plugin

(1)パッケージを入手します。

# wget https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-kuromoji/analysis-kuromoji-6.2.4.zip

(2)インストールを実施します。

# /usr/share/elasticsearch/bin/elasticsearch-plugin install file:///root/analysis-kuromoji-6.2.2.zip

※オンラインインストールもできます。

# /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-kuromoji

運用支援ツール(Curator)のインストール

Elasticsearchと対応するバージョンをインストールする必要があります。
https://www.elastic.co/guide/en/elasticsearch/client/curator/current/version-compatibility.html

インストール方法(公式)
https://www.elastic.co/guide/en/elasticsearch/client/curator/current/yum-repository.html

(1)パッケージを入手します。

# wget https://packages.elastic.co/curator/5/centos/7/Packages/elasticsearch-curator-5.4.1-1.x86_64.rpm

(2)インストールを実施します。

# rpm --import GPG-KEY-elasticsearch
# rpm --install elasticsearch-curator-5.4.1-1.x86_64.rpm

(3)バージョン確認を実施します。

# curator --version
  curator, version 5.4.1

X-Packのインストール

インストール方法(公式)
https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html#xpack-package-installation

(1)パッケージを入手します。

# wget https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-6.2.2.zip

(2)ダウンロードファイルを/tmpに移動します。
 ※ファイルの場所を指定可能なので本手順は任意です。

# mv x-pack-6.2.2.zip /tmp

(3)インストールを実施します。

# /usr/share/elasticsearch/bin/elasticsearch-plugin install file:///tmp/x-pack-6.2.2.zip
-> Downloading file:///tmp/x-pack-6.2.1.zip
[=================================================] 100%??
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.io.FilePermission \\.\pipe\* read,write
* java.lang.RuntimePermission accessClassInPackage.com.sun.activation.registries
* java.lang.RuntimePermission getClassLoader
* java.lang.RuntimePermission setContextClassLoader
* java.lang.RuntimePermission setFactory
* java.net.SocketPermission * connect,accept,resolve
* java.security.SecurityPermission createPolicy.JavaPolicy
* java.security.SecurityPermission getPolicy
* java.security.SecurityPermission putProviderProperty.BC
* java.security.SecurityPermission setPolicy
* java.util.PropertyPermission * read,write
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
Continue with installation? [y/N]y ←「y」を入力
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@        WARNING: plugin forks a native controller        @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
This plugin launches a native controller that is not subject to the Java
security manager nor to system call filters.
Continue with installation? [y/N]y ←「y」を入力
Elasticsearch keystore is required by plugin [x-pack-security], creating...
-> Installed x-pack with: x-pack-core,x-pack-deprecation,x-pack-graph,x-pack-logstash,x-pack-ml,x-pack-monitoring,x-pack-security,x-pack-upgrade,x-pack-watcher
#

OSのulimit設定

デフォルトのsystemctlにはulimitの記述があるのですが、コマンド起動や自作systemctl起動のためにulimit設定をしておいた方が無難です。

(1)ulimitファイルを開きます。

# vi /etc/security/limits.conf

(2)ulimitファイルの編集をします。

#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4
elasticsearch    -       nofile          65536  ←追加

(3)OSの再起動を実施します。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0