install_elasticsearch5.sh 400 B

123456789
  1. #!/bin/bash
  2. sudo sysctl -w vm.max_map_count=262144
  3. sudo apt-get autoremove --purge elasticsearch
  4. wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
  5. echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
  6. sudo apt-get update && sudo apt-get install elasticsearch -y
  7. sudo service elasticsearch start