Post

elasticsearchをcentos7にインストール

インストール

# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch # vi /etc/yum.repos.d/elasticsearch.repo ======= [elasticsearch-2.x] name=Elasticsearch repository for 2.x packages baseurl=http://packages.elastic.co/elasticsearch/2.x/centos gpgcheck=1 gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch enabled=1 # yum install elasticsearch

ホストの設定

# vi /etc/elasticsearch/elasticsearch.yml ======= # network.host: 192.168.0.1 network.host: 192.168.33.10

プラグインをインストール

  • kuromoji・・・日本語全検索
$ cd /usr/share/elasticsearch $ sudo bin/plugin install analysis-kuromoji

起動

# systemctl restart elasticsearch

プラグインのインストール確認

http://192.168.33.10:9200/_nodes/plugins?prettyでアクセス

{ "cluster_name" : "elasticsearch", "nodes" : { "yMQVOCqASVaP8BoKGeiYdw" : { "name" : "Quicksilver", "transport_address" : "192.168.33.10:9300", "host" : "192.168.33.10", "ip" : "192.168.33.10", "version" : "2.4.6", "build" : "5376dca", "http_address" : "192.168.33.10:9200", "plugins" : [ { "name" : "analysis-kuromoji", "version" : "2.4.6", "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.4.6", "description" : "Lucene expressions integration for Elasticsearch", "jvm" : true, "classname" : "org.elasticsearch.script.expression.ExpressionPlugin", "isolated" : true, "site" : false }, { "name" : "lang-groovy", "version" : "2.4.6", "description" : "Groovy scripting integration for Elasticsearch", "jvm" : true, "classname" : "org.elasticsearch.script.groovy.GroovyPlugin", "isolated" : true, "site" : false }, { "name" : "reindex", "version" : "2.4.6", "description" : "_reindex and _update_by_query APIs", "jvm" : true, "classname" : "org.elasticsearch.index.reindex.ReindexPlugin", "isolated" : true, "site" : false } ] } } }

Elasticsearch を yumでインストール (CentOS) - Qiita

This post is licensed under CC BY 4.0 by the author.