Skip to content

Instantly share code, notes, and snippets.

@goors
Last active May 3, 2024 10:21
Show Gist options
  • Save goors/fc984d00f5896cc0510d38bf91d247da to your computer and use it in GitHub Desktop.
Save goors/fc984d00f5896cc0510d38bf91d247da to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt-get update
sudo apt-get install gnupg -y
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --yes --dearmor -o /usr/share/keyrings/elasticsearch.gpg
echo "deb [signed-by=/usr/share/keyrings/elasticsearch.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt update
sudo apt install elasticsearch -y
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl status elasticsearch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment