A photo of Mitesh Shah

Mitesh Shah

Linux Expert | Automation Enthusiast | Security Consultant

Email Skype Github Twitter Resume Hire Me Keybase LinkedIn Stackoverflow


How to Install ElasticSearch

Overview

Elastic{Search}

  • Elasticsearch is a search server based on Lucene.
  • It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents.

Install Elastic{Search} on Debian/Ubuntu

Download and install the Public Signing Key

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

Setup Repository

$ echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elk.list

Install Elasticsearch

$ sudo apt-get update && sudo apt-get install elasticsearch

Configure Elasticsearch to automatically start during bootup

# Debian 8
$ sudo /bin/systemctl daemon-reload
$ sudo /bin/systemctl enable elasticsearch.service

# Ubuntu
$ sudo update-rc.d elasticsearch defaults 95 10

Install Elastic{Search} on CentOS

Download and install the Public Signing Key

$ rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

Setup Repository

$ sudo vim /etc/yum.repos.d/elk.repo
[elasticsearch-2.x]
name=Elasticsearch repository for 2.x packages
baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

Install Elasticsearch

$ yum install elasticsearch

Configure Elasticsearch to automatically start during bootup

$ sudo /bin/systemctl daemon-reload
$ sudo /bin/systemctl enable elasticsearch.service




Post Navigation