当我使用brew
安装elasticsearch时,它会自动默认为0.90.5
版本。有什么方法可以告诉brew安装版本1.1
吗?
最佳答案
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
我已经删除了该文件。
然后运行并检查版本和IP:
$ 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&brew。
关于elasticsearch - 使用brew安装Elasticsearch 1.1,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23034863/