2年半ぶりにインストールしてみた メモ

1. Elasticsearch インストール

$ wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.3/elasticsearch-2.3.3.tar.gz
$ tar xvfz elasticsearch-2.3.3.tar.gz
$ cd elasticsearch-2.3.3/bin
$ ./elasticsearch
$ curl http://localhost:9200/ <- 動作確認
{
  "name" : "Ariel",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.3.3",
    "build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
    "build_timestamp" : "2016-05-17T15:40:04Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}


2. 管理画面 elasticsearch-head のインストール

$ cd elasticsearch-2.3.3

$ bin/plugin install mobz/elasticsearch-head

$ vi config/elasticsearch.yml
network.host: 0 <- localhost以外からアクセスする時は設定必要。0はとりあえず...

elasticsearch 再起動

ブラウザから動作確認
http://hoge:9200/_plugin/head/


3. kuromoji インストール

$ cd elasticsearch-2.3.3/bin 
$ ./plugin install analysis-kuromoji
  • > Installing analysis-kuromoji...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/analysis-kuromoji/2.3.3/analysis-kuromoji-2.3.3.zip ... Downloading .........................................................................................................................................................................................................................................................................................DONE Verifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/analysis-kuromoji/2.3.3/analysis-kuromoji-2.3.3.zip checksums if available ... Downloading .DONE Installed analysis-kuromoji into /home/ec2-user/work/elasticsearch-2.3.3/plugins/analysis-kuromoji elasticsearch 再起動 $ curl -X GET 'http://localhost:9200/_nodes/plugins' <- plugins に組み込まれていることを確認 {"cluster_name":"elasticsearch","nodes":{"LmezOxGLSdapGXz17DdULw":{"name":"Ariel","transport_address":"127.0.0.1:9300","host":"127.0.0.1","ip":"127.0.0.1","version":"2.3.3","build":"218bdf1","http_address":"127.0.0.1:9200","plugins":[{"name":"analysis-kuromoji","version":"2.3.3","description":"The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.","jvm":true,"classname":"org.elasticsearch.plugin.analysis.kuromoji.AnalysisKuromojiPlugin","isolated":true,"site":false}],"modules":[{"name":"lang-expression","version":"2.3.3","description":"Lucene expressions integration for Elasticsearch","jvm":true,"classname":"org.elasticsearch.script.expression.ExpressionPlugin","isolated":true,"site":false},{"name":"lang-groovy","version":"2.3.3","description":"Groovy scripting integration for Elasticsearch","jvm":true,"classname":"org.elasticsearch.script.groovy.GroovyPlugin","isolated":true,"site":false},{"name":"reindex","version":"2.3.3","description":"_reindex and _update_by_query APIs","jvm":true,"classname":"org.elasticsearch.index.reindex.ReindexPlugin","isolated":true,"site":false}]}}}knaka ~/work/elasticsearch-2.3.3/bin $


4. Kibana インストール

$ wget https://download.elastic.co/kibana/kibana/kibana-4.5.1-linux-x64.tar.gz
$ tar xvfz kibana-4.5.1-linux-x64.tar.gz
$ cd kibana-4.5.1-linux-x64/bin
$ ./kibana
ブラウザからアクセスして動作確認 http://hoge:5601