Skip to content

Instantly share code, notes, and snippets.

@milon
Last active November 23, 2022 15:18
Show Gist options
  • Save milon/4ab18d0fc379bf4d3c50c5cd6886b621 to your computer and use it in GitHub Desktop.
Save milon/4ab18d0fc379bf4d3c50c5cd6886b621 to your computer and use it in GitHub Desktop.
Install Elasticsearch on Laravel Homestead

Install Elasticsearch on Laravel Homestead

Install Java

sudo apt-get install openjdk-7-jre-headless -y

Download & install the Public Signing Key

wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -

Add the following to /etc/apt/sources.list

deb http://packages.elasticsearch.org/elasticsearch/1.3/debian stable main

Update Aptitude

sudo apt-get update

Install Elasticsearch

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
@boghy933
Copy link

Hello, i just installed elasticsearch in my homestead, and i want to share with you the changes you need to apply to the guide:

Install Java - is now at version 11

sudo apt-get install openjdk-11-jdk-headless -y

Download & Install elasticsearch

I used the official guide here https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
Essentially you have to run:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch

@milon
Copy link
Author

milon commented Dec 13, 2019

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment