Skip to content

Instantly share code, notes, and snippets.

@kevsersrca
Last active March 27, 2018 11:39
Show Gist options
  • Save kevsersrca/94ebbfdf4c82fc997d9952946059416e to your computer and use it in GitHub Desktop.
Save kevsersrca/94ebbfdf4c82fc997d9952946059416e to your computer and use it in GitHub Desktop.
Elastic search setup on ubuntu 16.04

JAVA

sudo apt-get update
sudo apt-get install -y python-software-properties software-properties-common apt-transport-https
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install -y oracle-java8-installer
java -version

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch 

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

sudo apt-get update

sudo apt-get install -y elasticsearch

vim /etc/elasticsearch/elasticsearch.yml

`bootstrap.memory_lock: true
network.host: localhost
http.port: 9200`

vim /usr/lib/systemd/system/elasticsearch.service

`LimitMEMLOCK=infinity`

vim /etc/default/elasticsearch

`MAX_LOCKED_MEMORY=unlimited

sudo systemctl daemon-reload
sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch


TEST curl -XGET 'localhost:9200/?pretty'

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