Skip to content

Instantly share code, notes, and snippets.

@manojkumararyan
Last active August 28, 2018 09:36
Show Gist options
  • Save manojkumararyan/459a079d2d202090d5ba0ef00142ed38 to your computer and use it in GitHub Desktop.
Save manojkumararyan/459a079d2d202090d5ba0ef00142ed38 to your computer and use it in GitHub Desktop.

Install elasticsearch in ubuntu

Install java dependency for elasticsearch

- sudo apt-get update
- sudo apt-get install default-jre
- sudo apt-get install default-jdk

Install elasticsearch

- wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
- sudo apt-get install apt-transport-https
- echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list
- sudo apt-get update
- sudo apt-get install -y elasticsearch
- sudo systemctl enable elasticsearch
- sudo systemctl start elasticsearch
- curl localhost:9200
- systemctl status elasticsearch

JVM settings for memory

#for memory issue you can update this 
#open this file /etc/elasticsearch/jvm.options
#change these parameters as per your need
-Xms512m
-Xms512m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment