Install elasticsearch 1.1 using brew - elasticsearch

When I'm installing elasticsearch using brew it auto defaults to version 0.90.5. Is there a way that I can tell brew to install version 1.1?

brew update to update your brew
brew doctor optional if you want to check if all good with your system
and then:
brew upgrade elasticsearch to upgrade
or brew install elasticsearch
Finally brew info elasticsearch to check your system. My case:
$ 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
There is a possibility that you run via LaunchAgents the 90.5 That means that on user login ES starts running on the background. So the above should say something like:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
I have deleted that file btw.
Then run and check the version & the 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]}
If you run the above and see that the port is 9201 that means that you run two instances of ES in your mac. The second instance tried to start but the 9200 was already fulfilled so ES tried the next available 9201. You probably need to unload the first instance.
When upgrading you need to copy your configuration.
I think that's all you need about ES & brew.

$ brew search elasticsearch
…then you'll see something like…
elasticsearch
homebrew/versions/elasticsearch17 homebrew/versions/elasticsearch2
…then…
$ brew install elasticsearch17

brew update
brew doctor
And than
brew install elasticsearch
Or brew upgrade elasticsearch

Related

Elasticsearch on mac with brew doesn't let me run nor uninstall

I installed Elasticsearch with brew but I can't start kibana because I get the error:
Error: Cannot delete files/folders outside the current working directory. Can be overriden with the `force` option.
The forceoption doesn't work either.
I could not find any solution to solve it
Now I want to uninstall Elastic, but when I try brew unistall elasticsearch I get:
Error: No available formula or cask with the name "elasticsearch". Did you mean elasticsearch#6?
No clue what elasticsearch#6 supposed to be and it doesn't exist.
How can I either get Kibana running, or get rid of Elastic?
Try with the following commands
brew uninstall elasticsearch
rm -rf /usr/local/etc/elasticsearch
rm -rf /usr/local/var/lib/elasticsearch

How could I install Elasticsearch 1.2.1 with homebrew

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?
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.

Installing Elasticsearch on OSX Mavericks

I'm trying to install Elasticsearch 1.1.0 on OSX Mavericks but i got the following errors when i'm trying to start:
:> ./elasticsearch
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version
at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:252)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:236)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Also when i'm executing the same command with -v arg, i got this error:
:> ./elasticsearch -v
Exception in thread "main" java.lang.NoSuchFieldError: LUCENE_36
at org.elasticsearch.Version.<clinit>(Version.java:42)
Here's my environment:
Java version
>: java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Instalation path (downloaded .tar.gz archive from elasticsearch download page and extracted here):
/usr/local/elasticsearch-1.1.0
ENV vars:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
CLASSPATH=/usr/local/elasticsearch-1.1.0/lib/*.jar:/usr/local/elasticsearch-1.1.0/lib/sigar/*.jar
UPDATE
i finally make it working, unfortunally not sure how because i tried a lot of changes :). But here's a list of changes i made that can help:
i removed jdk and jre and reinstalled on a clean env.
http://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#A1096855
i deleted all the cache dirs.I suppose this can be the 'cause' for that it's working now
~/Library/Caches
/Library/Caches
i removed CLASSPATH env var.
ES_PATH and ES_HOME env vars are not set either, but i think this is not so important.
Note: now it's working also if i'm installing with brew.
Thanks.
You should really consider using brew. It's a great tool that will take care of dependencies, version control and much more.
To install Elasticsearch using brew, simply:
brew update
brew install elasticsearch
Boom! Done.
After that follow Elasticsearch instructions :
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
As there are not very good instructions for actually "installing" it onto a Mac:
Short Version:
Install Java (prefer latest supported release)
Set JAVA_HOME environment variable.
Download Elasticsearch version (tar or zip).
Extract Elasticsearch from the downloaded file.
Run bin/elasticsearch from the extracted directory.
Long version:
Download Java
Only need the JRE if you will not be writing code on the same machine.
I assume that you are getting the latest JDK, which is currently JDK 8 (as you appear to have, and I have installed working on my machine).
Download and extract Elasticsearch and extract it into some directory.
For example: mkdir -p ~/dev/elasticsearch
Optionally move the downloaded file to there:
mv Downloads/elasticsearch* ~/dev/elasticsearch
Extract the downloaded file:
cd ~/dev/elasticsearch (if you moved it in step 2)
If it's the zip, then unzip elasticsearch-1.1.0.zip (or if you don't want to cd into the directory, then just run unzip elasticsearch-1.1.0.zip -d ~/dev/elasticsearch)
If it's the tar, then tar -xvf elasticsearch-1.1.0.tar.gz (or if you don't want to cd into the directory, then just run tar -xvf elasticsearch-1.1.0.tar.gz -C ~/dev/elasticsearch)
Cleanup (if you want) by removing the downloaded file:
rm elasticsearch-1.1.0.*
Open your .bash_profile file for your bash profile settings:
vi ~/.bash_profile
In the file, export your environment variable(s)
export ES_HOME=~/dev/elasticsearch/elasticsearch-1.1.0
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
export PATH=$ES_HOME/bin:$JAVA_HOME/bin:$PATH
Close and re-open your Terminal OR
Run source ~/.bash_profile to update the environment variables
Run Elasticsearch:
elasticsearch
The more traditional way to run it is to do pretty much all of the above, but not add $ES_HOME/bin to the PATH. Then, just go to ES_PATH (cd $ES_PATH, then bin/elasticsearch) or run $ES_PATH/bin/elasticsearch.
Note: Do not setup your CLASSPATH without a very good reason. The scripts will do that for you.
You should try to using brew with last update:
brew update
And install Cask java:
brew cask install java
After that you can install elasticsearch:
brew install elasticsearch
And to have launched start elasticsearch now use:
brew services start elasticsearch
Or you can just run:
elasticsearch
To update ElasticSearch, just run brew upgrade elasticsearch
Update your java
brew update
brew cask install java
Install it with homebrew
brew install elasticsearch
install gpg &&
install java or jdk
1-Import the repository’s GPG key:
wget -qO - https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
2-this is code repository elasticserach in linux for download
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
3-link download elasticsearch
https://www.elastic.co/downloads/elasticsearch
if error
"Job for elasticsearch.service failed because a timeout was exceeded.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details."
solution:
1-sudo journalctl -f
2-sudo systemctl enable elasticsearch.service
3-sudo systemctl start elasticsearch

Using mongodump: "mongodump: command not found"

I'm trying to get a dump of my local database and it seems I should be using:
mongodump --host localhost:3002
However, the terminal then tells me:
-bash: mongodump: command not found
Am I missing something? Or going about this the wrong way? I'm using it on Mac from the terminal.
I installed mongo (I think) using the following commands:
curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.5.tgz > mongodb.tgz
tar -zxvf mongodb.tgz
As of MongoDB 4.4 (released July 30, 2020), you may need to install mongodump separately because the MongoDB Database Tools (which comprises mongodump, mongorestore, and more) has become its own project.
I found this out because I upgraded to MongoDB 4.4 today and mongodump stopped working.
$ mongodump
zsh: command not found: mongodump
I'm on macOS and installed MongoDB via Homebrew. To get mongodump and friends back, I installed the MongoDB Database Tools via Homebrew:
brew tap mongodb/brew
brew install mongodb-database-tools
If you're on a different OS, this should help:
MongoDB Database Tools Installation
brew tap mongodb/brew; brew install mongodb-community
will also install mongodump.
If you don't have the brew command, you really should consider install Homebrew
If you just extracted the .tgz file, the mongodump command is not available in your PATH. Go to your /bin/ subdirectory inside the directory where you have extracted mongodb.tgz, the mongodump binary should be there. Now you can execute:
./mongodump --host localhost:3002
It's much better though to install MongoDB with a package manager. Read this page:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
and use, for example, Homebrew to install MongoDB and have all the necessary binaries in PATH.
brew tap mongodb/brew
brew install mongodb-database-tools
For using mongodump, mongo-tools library has to be installed from os package manager.
It's probably just not in your path, it should be in the same directory as your "mongod", and you can then run it with:
/path/to/bin/mongodump --host localhost:3002
It's in the official MongoDB docs now. For example, to install the 3.2 version:
brew tap mongodb/brew
brew install mongodb-community#3.2
Then follow the steps to update your PATH environment variable.
You have to install mongo-tools to have mongodump.
sudo apt-get install mongo-tools
For Windows Users
You can download the MongoDB Database Tools from here
And you can read the installation guide here

unable to install elasticsearch plugin

I've downloaded elastic search plugin from
https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip
I've unzipped the folder and I know i'm supposed to put the 3 jar files in the lib/ directory (of play itself or of the application I'm creating or that of elasticsearch). but which lib/ directory shall i put it in? also, what shall i do next. i tried to understand the documentation on the website but i didn't.
I'll really appreciate any help as I've been trying for 2 days to install this plugin. I'm using play 1.2.4
Using current homebrew installation (March 2016 -- 2.2.0_1 version) resulted in the plugin executable not being linked, therefore i had to do:
$ ~HOMEBREW_ROOT/Cellar/elasticsearch/2.2.0_1/libexec/bin/plugin install mobz/elasticsearch-head
MAC OS - with brew elasticsearch base install
Install the elasticsearch package with brew :
brew install elasticsearch
Install the elasticsearch_head plugin to get a simple browser :
cd /usr/local/Cellar/elasticsearch/1.4.0/
sudo bin/plugin -install mobz/elasticsearch-head
open "http://127.0.0.1:9200/_plugin/head/"
Grab the plugin script path by using this command on Mac OS
brew info elasticsearch
Then, use the plugin script path to install:
/usr/local/Cellar/elasticsearch/2.3.3/libexec/bin/plugin install some/es-plugin
Download elastic search deb file from this link elastic search
and once installed then check elastic search status like sudo service elasticsearch status
To view elastic search index in GUI, run this command from your /usr/share directory
sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head
open "http://localhost:9200/_plugin/head/"
Try the builtin bin/plugin utility:
% bin/plugin -url https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip -install elasticsearch-suggest
-> Installing elasticsearch-suggest...
Trying https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip...
Downloading ..............................................................................DONE
Installed elasticsearch-suggest
% find plugins/elasticsearch-suggest
plugins/elasticsearch-suggest
plugins/elasticsearch-suggest/elasticsearch-suggest-0.0.3.jar
plugins/elasticsearch-suggest/lucene-misc-3.5.0.jar
plugins/elasticsearch-suggest/lucene-spellchecker-3.5.0.jar
%
In one line:
sudo /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
For ElasticSearch 7.10 in Ubuntu:
cd /usr/share/elasticsearch
sudo bin/elasticsearch-plugin install analysis-phonetic

Resources