0
3

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.

Elasticsearchをソースからビルドしてインストールする

Last updated at Posted at 2017-02-06

概要

Elasticsearch のソースを github から clone してきてビルドする手順です。
ドキュメント 通りです。

Elasticsearch は速いスピードでどんどんバージョンアップされており 2017年1月末に Elasticsearch 5.2 がリリース されましたが、5.3 以降で組み込まれる予定の [Field Collapsing] (https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-collapse.html) を利用してみたかったため、未リリースのバージョンをビルドしてみました。

手順

準備

java8 以上が必要です。

$ java -version
openjdk version "1.8.0_121"

ビルドツールの gradle をインストールします。
ドキュメント 通りです。

$ curl -s https://get.sdkman.io | bash
$ sdk install gradle 3.3
$ gradle -v
------------------------------------------------------------
Gradle 3.3
------------------------------------------------------------ 

ビルド

利用したいバージョンのソースを github から clone します。

$ git clone -b 5.x https://github.com/elastic/elasticsearch.git
$ cd elasticsearch/
$ git branch
* 5.x

ビルドします。
BUILD SUCCESSFUL と出れば完了です。

$ gradle assemble

インストール

ビルドされたパッケージが distribution/deb ディレクトリや distribution/rpm ディレクトリなどの配下にあるので、環境に合わせてインストールします。

$ ls distribution/rpm/build/distributions/
elasticsearch-5.3.0-SNAPSHOT.rpm

$ sudo rpm -ivh distribution/rpm/build/distributions/elasticsearch-5.3.0-SNAPSHOT.rpm

以上で Elasticsearch をソースからビルドしてインストールすることができました。
Field Collapsing とても便利そうです。

0
3
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
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?