Skip to content

Instantly share code, notes, and snippets.

@engelju
Forked from lukaswhite/elasticsearch-on-homestead.txt
Last active December 11, 2018 07:54
Show Gist options
  • Save engelju/5e1d4520cb22e170bec06f251d989ea4 to your computer and use it in GitHub Desktop.
Save engelju/5e1d4520cb22e170bec06f251d989ea4 to your computer and use it in GitHub Desktop.
Installing Elasticsearch on Laravel Homestead
# https://bosnadev.com/2014/09/12/install-elasticsearch-on-laravel-homestead/
# https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
# https://www.elastic.co/blog/elasticsearch-unplugged
# Install Java
sudo apt-get install openjdk-7-jre-headless -y
# Download & install the Public Signing Key
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
# Add the following to /etc/apt/sources.list
echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
# Install
sudo apt-get update && sudo apt-get install elasticsearch
# Configure Elasticsearch to run on startup
sudo update-rc.d elasticsearch defaults 95 10
# Start the server now
sudo /etc/init.d/elasticsearch start
# Test whether it's working
curl -X GET localhost:9200
vi /etc/elasticsearch/elasticsearch.yml
# add: network.host _non_loopback_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment