1

I need old Elasticsearch for my work. but I couldn't install Elasticsearch 1.2.1 with brew

Development environment

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

The procedure I tried

I tried the following process

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

There is no elasticsearch10.

So, I tracked down this guidance.

Homebrew install specific version of formula?

And typed this command.

$ 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

And also typed this command, however couldn't find out a key to installing elasticsearch version 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.

I need some help to bridge myself to installing elasticsearch 1.2.1 with brew.

Could you steer my steps?

Community
  • 1
  • 1
Kent Fujii
  • 35
  • 1
  • 8

1 Answers1

4

If you're just trying to do this for local development, then it's probably easier to just download and untar Elasticsearch into a directory.

$ 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

Once untarred, you can optionally delete the tarball:

$ rm elasticsearch-1.2.1.tar.gz

From there, it's just a matter of configuring (as desired) and starting Elasticsearch.

$ vi config/elasticsearch.yml
$ bin/elasticsearch

Note: Elasticsearch 1.2.1 is an extremely old version. I strongly recommend that you upgrade to a more recent release to gain reliability and security. For example, ES 1.2.1 uses MVEL scripting, which is bad at best.

For your production scenario (after New Years, of course), you can easily perform a rolling restart from ES 1.2.1 to ES 1.7.4 to gain a lot of features and stability without much risk. If you have dedicated master nodes, then I recommend starting with them first to get a few extra benefits upfront.

pickypg
  • 22,034
  • 5
  • 72
  • 84
  • I'm so glad for your help. And I would use elasticsearch17 for my private. However my workplace is using 1.2.1 installed by brew, so if I could I would like to install elasticsearch 1.2.1 by brew. – Kent Fujii Dec 25 '15 at 11:01
  • @KentFujii [Here's the formula for ES 1.2.1](https://raw.githubusercontent.com/Homebrew/homebrew/3bbd4f189c7283947b7a018f6f579067f627627b/Library/Formula/elasticsearch.rb). You can find it from the [history of the formula for versions](https://github.com/Homebrew/homebrew/commits/master/Library/Formula/elasticsearch.rb). – pickypg Dec 26 '15 at 05:26