使用brew安装elasticsearch 1.1

时间:2014-04-12 19:07:02

标签: elasticsearch homebrew

当我使用brew安装elasticsearch时,它会自动默认为版本0.90.5。有没有办法告诉brew安装版本1.1

3 个答案:

答案 0 :(得分:41)

  • brew update更新您的brew
  • brew doctor可选,如果您想检查系统是否合适

然后:

  • brew upgrade elasticsearch升级
  • brew install elasticsearch

最后brew info elasticsearch检查您的系统。我的情况:

$ brew info elasticsearch
elasticsearch: stable 1.1.0, HEAD
http://www.elasticsearch.org
/usr/local/Cellar/elasticsearch/1.0.0 (471 files, 78M)
  Built from source
/usr/local/Cellar/elasticsearch/1.0.1 (363 files, 79M)
  Built from source
/usr/local/Cellar/elasticsearch/1.1.0 (31 files, 21M) *
  Built from source
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/elasticsearch.rb
==> Caveats
Data:    /usr/local/var/elasticsearch/elasticsearch_dionysis_lorentzos/
Logs:    /usr/local/var/log/elasticsearch/elasticsearch_dionysis_lorentzos.log
Plugins: /usr/local/var/lib/elasticsearch/plugins/

To have launchd start elasticsearch at login:
    ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Then to load elasticsearch now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
Or, if you don't want/need launchctl, you can just run:
    elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml

有可能你通过LaunchAgents运行90.5这意味着用户登录ES开始在后台运行。所以上面应该说:

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist

我已删除该文件btw。

然后运行并检查版本&知识产权:

$ elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
[2014-04-13 17:13:18,006][INFO ][node] [Archie Corrigan] version[1.1.0], pid[8108], build[2181e11/2014-03-25T15:59:51Z]
<<other lines here>>
[2014-04-13 17:13:27,269][INFO ][http ] [Archie Corrigan] bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[/127.0.0.1:9200]}

如果你运行上面的命令并看到端口是9201,这意味着你在mac中运行了两个ES实例。第二个例子试图启动,但9200已经完成,所以ES尝试了下一个可用的9201.你可能需要unload第一个实例。

升级时,您需要复制配置。

我认为您对ES&amp; amp;酿造。

答案 1 :(得分:5)

$ brew search elasticsearch

...然后你会看到类似......

的东西
elasticsearch 
homebrew/versions/elasticsearch17  homebrew/versions/elasticsearch2

...则...

$  brew install elasticsearch17

答案 2 :(得分:0)

brew update
brew doctor

而不是 brew install elasticsearch

brew upgrade elasticsearch