Skip to content

Instantly share code, notes, and snippets.

@pioz
Created December 20, 2017 08:42
Show Gist options
  • Save pioz/dab8efbb84acd41ac9530a2a7bf773d5 to your computer and use it in GitHub Desktop.
Save pioz/dab8efbb84acd41ac9530a2a7bf773d5 to your computer and use it in GitHub Desktop.
How to install Elasticsearch 6.x on Ubuntu

How to install Elasticsearch on Ubuntu

Install Java 8

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Get elastic GPG key

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Install dependencies

sudo apt-get install apt-transport-https

Add Elasticsearch repository

echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list

Update APT

sudo apt-get update

Install Elasticsearch

sudo apt-get install elasticsearch

Add update.rc

sudo update-rc.d elasticsearch defaults 95 10

Start server

sudo -i service elasticsearch start

Stop server

sudo -i service elasticsearch stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment