当我使用brew
它安装elasticsearch时,自动默认为版本0.90.5
.有没有办法告诉brew安装版本1.1
?
brew update
更新你的酿造
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.
然后运行并检查版本和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] <> [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所需要的一切.
$ brew search elasticsearch
......然后你会看到......
elasticsearch homebrew/versions/elasticsearch17 homebrew/versions/elasticsearch2
…然后…
$ brew install elasticsearch17