LoginSignup
8
8

More than 5 years have passed since last update.

CentOS6.5でElasticSearchを動かす

Last updated at Posted at 2014-11-16

Vagrantで立ち上げたCentOS6.5のサーバに公式サイトからElasticSearchのtarをダウンロードして起動するまでのメモ。

公式サイトからtarをダウンロード。
バージョンは現時点(2014.11.16)では1.4.0だった。

$ sudo yum install wget java-1.8.0-openjdk-devel -y
$ wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.0.tar.gz
$ tar -xvf elasticsearch-1.4.0.tar.gz

ElasticSearchを起動する。

$ cd elasticsearch-1.4.0/
$ ./bin/elasticsearch
[2014-11-16 04:29:28,660][INFO ][node                     ] [Thena] version[1.4.0], pid[2551], build[bc94bd8/2014-11-05T14:26:12Z]
[2014-11-16 04:29:28,661][INFO ][node                     ] [Thena] initializing ...
[2014-11-16 04:29:28,668][INFO ][plugins                  ] [Thena] loaded [], sites []
[2014-11-16 04:29:32,724][INFO ][node                     ] [Thena] initialized
[2014-11-16 04:29:32,731][INFO ][node                     ] [Thena] starting ...
[2014-11-16 04:29:32,968][INFO ][transport                ] [Thena] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.0.2.15:9300]}
[2014-11-16 04:29:33,030][INFO ][discovery                ] [Thena] elasticsearch/9IhKlDvZQE-T0zT5SXRaSA
[2014-11-16 04:29:36,873][INFO ][cluster.service          ] [Thena] new_master [Thena][9IhKlDvZQE-T0zT5SXRaSA][elastic-search][inet[/10.0.2.15:9300]], reason: zen-disco-join (elected_as_master)
[2014-11-16 04:29:36,929][INFO ][http                     ] [Thena] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.0.2.15:9200]}
[2014-11-16 04:29:36,930][INFO ][node                     ] [Thena] started

ElasticSearchにアクセス(HTTPリクエスト)する。

$ curl localhost:9200
{
  "status" : 200,
  "name" : "Thena",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.4.0",
    "build_hash" : "bc94bd81298f81c656893ab1ddddd30a99356066",
    "build_timestamp" : "2014-11-05T14:26:12Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.2"
  },
  "tagline" : "You Know, for Search"
}

終わり。

8
8
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
8
8