目的
-
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"
}
- 無事に追加された!