LoginSignup
4
5

More than 5 years have passed since last update.

Elasticsearch 6.2.2 で elasticsearch-head を使うためにやったこと

Posted at

Solr Admin みたいなインデックス可視化ツールはないかなと探したら elasticsearch-head というものがあるということで導入しました。

手元の環境は以下になります。

  • Ubuntu 16.04 LTS
  • Elasticsearch 6.2.2

最初に Node.js をインストールします。

$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo apt-get install -y build-essential

次に 公式ページ を参考に以下のようにインストールします。

$ git clone git://github.com/mobz/elasticsearch-head.git
$ cd elasticsearch-head
$ npm install

今回はプラグインとしてインストールしていないので、elasticsearch.yml に以下の設定が必要になります。

http.cors.enabled: true
http.cors.allow-origin: "*"

上記の設定を行うとセキュリティリスクが高まるようなので、現状だとこのツールは検証環境などのインデックスを確認するための用途になるかと思います。

最後は以下のようにして起動します。

$ npm run start

参考になった記事

パッケージマネージャを利用した Node.js のインストール

4
5
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
4
5