Laravel Homestead

Install Elasticsearch on Laravel Homestead

Recently I started working on a Laravel project that requires integration with Elasticsearch search engine. I didn’t want to change super cool development environment that Taylor (creator of Laravel) so kindly provided to us, so I installed Elasticsearch on Homestead instead of creating a new Vagrant box specially for this project. Here is a little snippet that will help you if you want to use Elasticsearch in you Laravel application.

 

After that you can configure port forwarding, edit your homestead.rb file and add following line just below other port forwards:

You need to reload vagrant box:

Now, on your host, try to make curl request:

and you should have the following response:

That’s it, now when we have installed Elasticsearch on Laravel Homestead, in one of the next tutorials we will see how to index and search data.

 

Update (04.12.2015.):
Tutorial has been updated to show installation process of the latest stable release of Elesticsearch at this time (2.1.0).

Follow me

Mirza Pasic

Full Stack Developer at OLX
Web Developer. Geek. Systematic. Dreamer
Follow me

Published by

Mirza Pasic

Web Developer. Geek. Systematic. Dreamer