Elasticsearch is a flexible and powerful free / libre / open source, distributed, real-time search and analytics engine. It is super fast, RESTful, based on Apache Lucene and has a very high activity level:

It is part of “The Elasticsearch ELK Stack”. The two other apps of the stack are:

  • Logstash helps you take logs and other time based event data from any system and store it in a single place for additional transformation and processing.
  • Kibana is Elasticsearch’s data visualization engine, allowing you to natively interact with all your data in Elasticsearch via custom dashboards.

It is also part of Tiki Suite

Assumption: you want to use Elasticsearch for data on a ClearOS instance to index data on the same server (ex.: with WordPress, Tiki, etc.). To have a more advanced setup (ex.: a cluster), please refer to the Elasticsearch documentation.

Big picture steps
  1. Install Java
  2. Install Elasticsearch
  3. Configure your apps to use Elasticsearch
Step by step
  1. Get Java 1.8
    yum --enablerepo=clearos-core install java-1.8.0-openjdk
  2. Set Java 1.8 as default
    alternatives --config java
  3. Import public key
    rpm --import
  4. create /etc/yum.repos.d/elasticsearch.repo with the following snippet
    name=Elasticsearch repository for 1.4.x packages
  5. Install Elasticsearch (and follow instructions)
    yum install elasticsearch
  6. Configure Elasticsearch to automatically start during bootup
    chkconfig --add elasticsearch
  7. Reboot to test
  8. Check if Elasticsearch is running with the following command
    curl localhost:9200
  9. Make sure does not answer. If it does, you need to activate the firewall. It's important to add security (by default, it's wide open). See Elasticsearch documentation.

Here is an example of a working Elasticsearch instance.

[root@example ~]# curl localhost:9200
  "status" : 200,
  "name" : "Norrin Radd",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.4.4",
    "build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
    "build_timestamp" : "2015-02-19T13:05:36Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.3"
  "tagline" : "You Know, for Search"
Long term
content/en_us/kb_elasticsearch.txt · Last modified: 2015/06/17 14:01 (external edit)