【问题标题】:How could I install Elasticsearch 1.2.1 with homebrew如何使用自制软件安装 Elasticsearch 1.2.1
【发布时间】:2015-12-25 01:16:47
【问题描述】:

我的工作需要旧的 Elasticsearch。但我无法使用 brew 安装 Elasticsearch 1.2.1

开发环境

$ brew --version
Homebrew 0.9.5 (git revision 567b; last commit 2015-12-23)

我尝试的过程

我尝试了以下过程

$ brew search elasticsearch
elasticsearch ✔                              homebrew/versions/elasticsearch20
homebrew/versions/elasticsearch17 ✔

没有elasticsearch10。

所以,我找到了这个指南。

Homebrew install specific version of formula?

并输入了这个命令。

$ brew info elasticsearch
elasticsearch: stable 2.1.1, HEAD
Distributed search & analytics engine
https://www.elastic.co/products/elasticsearch
/usr/local/Cellar/elasticsearch/2.1.1 (52 files, 31M)
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/elasticsearch.rb
==> Caveats
Data:    /usr/local/var/elasticsearch/elasticsearch_kent/
Logs:    /usr/local/var/log/elasticsearch/elasticsearch_kent.log
Plugins: /usr/local/Cellar/elasticsearch/2.1.1/libexec/plugins/
Config:  /usr/local/etc/elasticsearch/

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

也输入了这个命令,但是找不到安装elasticsearch 1.2.1版的关键

$ 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 安装 elasticsearch 1.2.1。

你能引导我的脚步吗?

【问题讨论】:

    标签: elasticsearch homebrew


    【解决方案1】:

    如果您只是为了本地开发而尝试这样做,那么只需将 Elasticsearch 下载并解压到一个目录中可能会更容易。

    $ cd /path/to/install/at
    $ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.2.1.tar.gz
    $ tar -xf elasticsearch-1.2.1.tar.gz
    $ cd elasticsearch-1.2.1
    

    解压后,您可以选择删除压缩包:

    $ rm elasticsearch-1.2.1.tar.gz
    

    从那里,只需配置(根据需要)和启动 Elasticsearch。

    $ vi config/elasticsearch.yml
    $ bin/elasticsearch
    

    注意:Elasticsearch 1.2.1 是一个非常旧的版本。我强烈建议您升级到更新的版本以获得可靠性和安全性。例如,ES 1.2.1 使用 MVEL 脚本,这充其量是不好的。

    对于您的生产场景(当然是在新年之后),您可以轻松执行rolling restart from ES 1.2.1 to ES 1.7.4 以获得很多功能和稳定性,而没有太大风险。如果您有专用的主节点,那么我建议您先从它们开始,以获得一些额外的好处。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    • 2021-12-13
    • 1970-01-01
    相关资源
    最近更新 更多