LoginSignup
15
14

More than 5 years have passed since last update.

Mac にElasticsearch の環境を構築する(Homebrewでバージョン指定したインストールを行う)

Posted at

目的

  • AWS上でElasticsearch動かしてきたけどやっぱりお金かかるので折角MacあるしMac上で完結させる
  • 既に本番環境にサービスインしてる状態のElasticsearchとなるべくバージョンは合わせたい
  • Homebrewで入れたい

各種設定確認

$ brew --version
0.9.5 (git revision 18cf8; last commit 2015-12-09)
$ brew list
autoconf        libevent        mysql           pkg-config      readline        wget
freetype        libpng          nkf         qt          redis           xz
imagemagick     libtool         node            rbenv           ruby-build
jpeg            mongodb         openssl         rbenv-gem-rehash    tmux

利用するもの

なぜこれを使用しようと思ったか

  • いくつかの記事でversionsを探すコマンドとして紹介された物を実行した時にもうサポートしてねぇよ!代わりにこれ使えよ!とツンデレ風に言われたので
$ brew versions elasticsearch
Error: The `versions` command is no longer supported.
You can use the homebrew-versions tap instead:
  https://github.com/Homebrew/homebrew-versions
Or use `brew log` to browse the git history.

やったこと

  • 基本的にはこの方の仰るとおりに進めていった
$ brew update # formuls を更新
$ brew install homebrew/versions # Version が色々入ってる奴
$ brew install homebrew/versions/elasticsearch17
######################################################################## 100.0%
==> Downloading https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.3.tar.gz

結果

$ brew list | grep elasticsearch
elasticsearch17
$ elasticsearch
$ curl -XGET 'http://localhost:9200/'
{
  "status" : 200,
  "name" : "Sagittarius",
  "cluster_name" : "elasticsearch_geshi_yoshiharu",
  "version" : {
    "number" : "1.7.3",
    "build_hash" : "05d4530971ef0ea46d0f4fa6ee64dbc8df659682",
    "build_timestamp" : "2015-10-15T09:14:17Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}
  • 無事に追加された!
15
14
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
15
14