Difference between revisions of "ElasticSearch"

(Created page with "Category:Linux =Requirements= To install and use ELK you need: * '''JAVA 1.7.55+''' <syntaxhiglight lang="bash"> java -version </syntaxhighlight> Java version mus...")
 
Line 30: Line 30:
  
  
* '''Add ELK repository''': see [Sources#ELK]
+
* '''Add ELK repository''': see [[Sources#ELK]]
 
* Install application
 
* Install application
  
<syntaxhiglight lang="bash">
+
<syntaxhighlight lang="bash">
 
apt-get install elasticsearch
 
apt-get install elasticsearch
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 40: Line 40:
 
* Register application as a service
 
* Register application as a service
  
<syntaxhiglight lang="bash">
+
<syntaxhighlight lang="bash">
 
cd /etc/init.d
 
cd /etc/init.d
 
update-rc.d elasticsearch defaults 95 10
 
update-rc.d elasticsearch defaults 95 10
Line 50: Line 50:
 
Edit the configuration file:  
 
Edit the configuration file:  
  
<syntaxhiglight lang="bash">
+
<syntaxhighlight lang="bash">
 
vim /etc/elasticsearch/elasticsearch.yml
 
vim /etc/elasticsearch/elasticsearch.yml
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 57: Line 57:
 
Set your CLUSTER and NODE name.
 
Set your CLUSTER and NODE name.
  
<syntaxhiglight lang="yml">
+
<syntaxhighlight lang="yml">
 
cluster.name: VEHCO        # line 33
 
cluster.name: VEHCO        # line 33
 
node.name: "SMARTCARDS"     # line 40
 
node.name: "SMARTCARDS"     # line 40
Line 70: Line 70:
 
The following plugin list is the one recommanded by ElasticSearch team into their "introduction to ES" webinar.  
 
The following plugin list is the one recommanded by ElasticSearch team into their "introduction to ES" webinar.  
  
<syntaxhiglight lang="bash">
+
<syntaxhighlight lang="bash">
 
cd /usr/share/elasticsearch/
 
cd /usr/share/elasticsearch/
 
./plugin -install karmi/elasticsearch-paramedic
 
./plugin -install karmi/elasticsearch-paramedic
Line 96: Line 96:
 
==Start ElasticSearch==
 
==Start ElasticSearch==
  
<syntaxhiglight lang="bash">
+
<syntaxhighlight lang="bash">
 
service elasticsearch start  
 
service elasticsearch start  
  

Revision as of 18:24, 17 November 2014


Requirements

To install and use ELK you need:

  • JAVA 1.7.55+

<syntaxhiglight lang="bash"> java -version </syntaxhighlight>

Java version must be > 1.7.0_55


  • Firewall rule

Open the port 9200. See FW input && FW output



ElasticSearch

Installation

Source: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html


  • Add ELK repository: see Sources#ELK
  • Install application
apt-get install elasticsearch


  • Register application as a service
cd /etc/init.d
update-rc.d elasticsearch defaults 95 10


Configuration

Edit the configuration file:

vim /etc/elasticsearch/elasticsearch.yml


Set your CLUSTER and NODE name.

cluster.name: VEHCO         # line 33
node.name: "SMARTCARDS"	    # line 40


Extensions (plugins)

You need to install some extensions (plugins) to get the full power of ElasticSearch.


The following plugin list is the one recommanded by ElasticSearch team into their "introduction to ES" webinar.

cd /usr/share/elasticsearch/
./plugin -install karmi/elasticsearch-paramedic
./plugin -install mobz/elasticsearch-head
./plugin -install royrusso/elasticsearch-HQ


More information about each plugin:


You can access the plugins using the /_plugin/ URL:


You can search for more plugins on Google or the official ElasticSearch web-site. Checkout http://www.elasticsearch.org/download to get a list of plugins available per official developer.


Start ElasticSearch

<syntaxhighlight lang="bash"> service elasticsearch start

    1. OR ##

/etc/init.d/elasticsearch start </syntaxhiglight>



TO BE CONTINUED...

user & group "elasticsearch"

>> CONF_DIR=/etc/elasticsearch >> LOG_DIR=/var/log/elasticsearch >> DATA=/var/lib/elasticsearch