Download the latest version of Elastic search from here: http://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.5.tar.gz The current version is 0.18.5 but a later version should be ok
Unpack the tar file in the download directory (doubleclick on the tar file) this should create the directory ~/Downloads/elasticsearch-0.18.5
open a console in the download directory and pull down the elastic search service wrapper from github.
$cd ~/Downloads
$git clone https://github.com/elasticsearch/elasticsearch-servicewrapper.git elasticsearch-servicewrapper
Now we will move the service into place
$cd ~/Downloads
$sudo mv elasticsearch-0.18.5 /usr/local/share
$cd elasticsearch-servicewrapper
$sudo mv service /usr/local/share/elasticsearch-0.18.5/bin
$cd /usr/local/share
$sudo ln -s elasticsearch-0.18.5 elasticsearch
$sudo chown -R root:wheel elasticsearch
Now we can start up the service
$cd /usr/local/share/elasticsearch
$sudo bin/service/elasticsearch start
You should see the following output
$ sudo bin/service/elasticsearch start
Starting ElasticSearch. Detected Mac OSX and installed launchd daemon.
Waiting for ElasticSearch...
.
.
.
.
.
.
running: PID:57767
$
Note: The pid number will be different on your system
Check the service is ok by opening up a browser on http://localhost:9200, you should see the following output
{
"ok" : true,
"name" : "Bova",
"version" : {
"number" : "0.18.5",
"date" : "2011-03-01T19:07:42",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 30",
"text1" : "\"The chances of finding out what's really going on in the universe are so remote, the only thing to do is hang the sense of it and keep yourself occupied. Look at me, I design fjords. I'd far rather be happy than right any day.\"",
"text2" : "\"And are you?\"",
"text3" : "\"No, that's where it all falls apart I'm afraid.\"",
"text4" : "\"Pity, it sounded like quite a nice lifestyle otherwise.\""
}
}
Stopping Elastic search
use a similar command to starting as shown above.
$cd /usr/local/share/elasticsearch
$sudo bin/service/elasticsearch stop
5 comments:
Thank you very much for the directions, this was a great help ever for .16!
Just a note, you had one typo:
sudo chmod -R root:wheel elasticsearch
You meant chown not chmod;)
Thanks Brady, Correction applied
That worked well, thanks.
Like Brandy said, this:
sudo chmod -R root:wheel elasticsearch
Should read:
sudo chown -R root:wheel elasticsearch
Also in the move commands above the filename is 1.15 rather than 0.15 which was right at the time. At the time of writing this the version number is 0.18.5, so the 1.15 reference made me wonder if I had accidentally downloaded some ancient version
Thanks unknow, I have applied the corrections you have outlined.
what's wrong with homebrew?
"brew update"
"brew install elasticsearch"
"mkdir -p ~/Library/LaunchAgents
"ln -nfs /usr/local/Cellar/elasticsearch/0.18.6/org.elasticsearch.plist ~/Library/LaunchAgents/"
"launchctl load -wF ~/Library/LaunchAgents/org.elasticsearch.plist"
Post a Comment