14
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSにElasticSearchをインストールする

Posted at

#Javaをインストール

Javaが必要なのでインストールする

yum -y install java-1.8.0-openjdk-devel.x86_64

#yumレポジトリの追加

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
vim /etc/yum.repos.d/elasticsearch.repo
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

起動

/etc/init.d/elasticsearch start

#確認

curl localhost:9200
[root@b1d204be4849 /]# curl localhost:9200
{
  "name" : "Kilmer",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.2.0",
    "build_hash" : "8ff36d139e16f8720f2947ef62c8167a888992fe",
    "build_timestamp" : "2016-01-27T13:32:39Z",
    "build_snapshot" : false,
    "lucene_version" : "5.4.1"
  },
  "tagline" : "You Know, for Search"
}

#kuromojiインストール

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

##インストールされているか確認

curl -X GET localhost:9200/_nodes/plugins?pretty
{
  "cluster_name" : "elasticsearch",
  "nodes" : {
    "ZbA9wH8NSaKORP0o-mR1Pg" : {
      "name" : "Kilmer",
      "transport_address" : "127.0.0.1:9300",
      "host" : "127.0.0.1",
      "ip" : "127.0.0.1",
      "version" : "2.2.0",
      "build" : "8ff36d1",
      "http_address" : "127.0.0.1:9200",
      "plugins" : [ {
        "name" : "analysis-kuromoji",
        "version" : "2.2.0",
        "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.2.0",
        "description" : "Lucene expressions integration for Elasticsearch",
        "jvm" : true,
        "classname" : "org.elasticsearch.script.expression.ExpressionPlugin",
        "isolated" : true,
        "site" : false
      }, {
        "name" : "lang-groovy",
        "version" : "2.2.0",
        "description" : "Groovy scripting integration for Elasticsearch",
        "jvm" : true,
        "classname" : "org.elasticsearch.script.groovy.GroovyPlugin",
        "isolated" : true,
        "site" : false
      } ]
    }
  }
}

メモ代わりに

#参考資料
Elasticsearch を yumでインストール (CentOS)

14
18
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
14
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?