First need to download Java from: Java Download
When you finish the installation, proceed to use brew in your favorite term with brew.
$ brew install elasticsearch
When is finish the installation you have 3 options, but in our case need to run at login, so only run the next commands.
ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Now have a elastic running, only need to test making a curl call.
curl -XGET 'localhost:9200/_analyze?analyzer=standard' -d 'this is a test'
Return.
{"tokens":[{"token":"this","start_offset":0,"end_offset":4,"type":"<ALPHANUM>","position":1},{"token":"is","start_offset":5,"end_offset":7,"type":"<ALPHANUM>","position":2},{"token":"a","start_offset":8,"end_offset":9,"type":"<ALPHANUM>","position":3},{"token":"test","start_offset":10,"end_offset":14,"type":"<ALPHANUM>","position":4}]}
Done!