LoginSignup
2
4

More than 5 years have passed since last update.

Elasticsearch(5.3.0) でelasticsearch-headを使う

Last updated at Posted at 2017-10-23

elasticsearch-headとは

elasticsearch-headは、ブラウザで動くElasticsearchのGUIです。
elasticsearch-headは、Node.jsで動いており、Gruntを利用してWEBサーバを起動させます

インストール方法

Node.js が入ってなければインストール

$ node -v
v6.9.4

npm が入ってなければインストール

$ npm -v
3.10.10

Gruntのインストール(gruntコマンドを利用できるようにするため、「grunt-cli」をnpmを利用して入れる)

$ sudo npm install -g grunt-cli

elasticsearch-headのセットアップ

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

GruntでWebサーバを起動

$ grunt server

http://localhost:9200 にアクセス

すると

「cluster health: not connected」

とエラーが

elasticsearchの設定を変更

$ vi /usr/local/etc/elasticsearch/elasticsearch.yml
+ http.cors.enabled: true
+ http.cors.allow-origin: “*"

の二行を追記して、Elasticsearchを再起動

$ sudo services elasticsearch restart

http://localhost:9200 にアクセス

スクリーンショット 2017-10-23 19.05.21.png

開いた( ´ ▽ ` )ノ

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