在Mac上建立Elasticsearch的环境(使用Homebrew进行特定版本的安装)

达到的结果或预期的结果。

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

使用的东西

    homebrew-versions

为什么你觉得要使用这个?

    いくつかの記事で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.

做过的事情 (zuò guò de shì

    基本的にはこの方の仰るとおりに進めていった
$ 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"
}
    無事に追加された!
广告
将在 10 秒后关闭
bannerAds