Last active
September 27, 2019 17:18
-
-
Save alfhen/acf324e945ee2b5a43ef56ee8a7720f5 to your computer and use it in GitHub Desktop.
Install ElasticSearch on Laravel Homestead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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