Skip to content

Instantly share code, notes, and snippets.

@defaye
Created May 29, 2020 12:02
Show Gist options
  • Save defaye/a9a2558aacc052a3f5324e31e092c9ab to your computer and use it in GitHub Desktop.
Save defaye/a9a2558aacc052a3f5324e31e092c9ab to your computer and use it in GitHub Desktop.
Install ElasticSearch on Ubuntu 18.04
# https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-18-04
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
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 update && sudo apt install -y elasticsearch
sudo sed -i -E "s/^\#?network\.host:\s+.*$/network.host: localhost/" /etc/elasticsearch/elasticsearch.yml
sudo service elasticsearch start # start as a service
systemctl list-units --type service | grep elasticsearch # check it is active and enabled on boot # https://askubuntu.com/questions/912216/16-04-command-to-list-all-services-started-on-boot
@defaye
Copy link
Author

defaye commented Jun 2, 2020

To run this command in one line:

curl -s https://gist.github.com/defaye/a9a2558aacc052a3f5324e31e092c9ab/raw/a5e14ace5f643cd734282488e59ffd6dbd4e59b4/install_elasticsearch.sh | sh

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