Skip to content

Instantly share code, notes, and snippets.

@barryvdh
Created November 28, 2021 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barryvdh/86181d2975f72bd1f1c861757d42071e to your computer and use it in GitHub Desktop.
Save barryvdh/86181d2975f72bd1f1c861757d42071e to your computer and use it in GitHub Desktop.
ElasticSearch7 on Forge Recipe
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
echo ">> Import the Elasticsearch PGP Key"
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo ">> Installing from the APT Repository"
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
apt-get update && apt-get -y install elasticsearch
echo ">> Configure Elasticsearch to startup"
update-rc.d elasticsearch defaults 95 10
echo ">> Start Elasticsearch service"
service elasticsearch start
echo ">> Test Elasticsearch service"
curl -X GET "localhost:9200/?pretty"
echo ">> Install Plugins"
cd /usr/share/elasticsearch
bin/elasticsearch-plugin install analysis-phonetic
bin/elasticsearch-plugin install analysis-icu
sudo service elasticsearch restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment