Skip to content

Instantly share code, notes, and snippets.

@alfhen
Last active September 27, 2019 17:18
Show Gist options
  • Save alfhen/acf324e945ee2b5a43ef56ee8a7720f5 to your computer and use it in GitHub Desktop.
Save alfhen/acf324e945ee2b5a43ef56ee8a7720f5 to your computer and use it in GitHub Desktop.
Install ElasticSearch on Laravel Homestead
# Login as root
sudo -s
# Update Aptitude
apt-get update
# Install Java
apt-get install openjdk-7-jre-headless -y
# Download and install Elasticsearch Public Signing Key
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
# Add repository
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
# Update Aptitude
apt-get update
# Install Elasticsearch
apt-get install elasticsearch
# Set Elasticsearch to run on startup
update-rc.d elasticsearch defaults 95 10
# Start Elasticsearch server
/etc/init.d/elasticsearch start
# Test whether it's working
curl -X GET localhost:9200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment