Install Elasticsearch 1.7.x and Kibana 4.1.x on CentOS 6.5

Elasticsearch 1.7.0 based on Lucene 4.10.4 recently released is a small release, which contains two important security fixes and two important features which will improve cluster stability and recovery: Security fixes, Delayed shard allocation & Prioritization of index recovery. Full details of the release information can be found here.

Kibana 4.1.x which was also released recently is now available for data dicing, stat splicing, log munching, chart crunching enjoyment. In addition to a fork load of great new features, a big focus on performance was also factored in Kibana 4.1, improving responsiveness across the board and reducing memory consumption by as much as 10x. Kibana 4.1 does more, and does it all more quickly. Click here for full release notes

elasticsearch kibana centos 6.5

Install Elasticsearch 1.7.0 on CentOS 6.5

– First install latest Java 8 update (Below is for 64bit OS so if you plan to install on a 32bit OS, just change the URL to the 32bit URL which is “http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jre-8u51-linux-i586.tar.gz“)

cd /opt

sudo yum install wget

sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jre-8u51-linux-x64.tar.gz"

sudo tar xvf jre-8*.tar.gz

sudo chown -R root: jre1.8*

sudo alternatives --install /usr/bin/java java /opt/jre1.8*/bin/java 1

sudo rm /opt/jre-8*.tar.gz

sudo rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch

sudo vi /etc/yum.repos.d/elasticsearch.repo

– Add following into the repository created above – /etc/yum.repos.d/elasticsearch.repo

elasticsearch-1.7]
name=Elasticsearch repository for 1.7.x packages
baseurl=http://packages.elasticsearch.org/elasticsearch/1.7/centos
gpgcheck=1
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
enabled=1
sudo yum -y install elasticsearch-1.7.0

– Edit elasticsearch configuration > locate “network.host:” and update to “network.host: localhost”

sudo vi /etc/elasticsearch/elasticsearch.yml

– Start elasticsearch and set it to auto run on boot up

/etc/init.d/elasticsearch status

sudo chkconfig --levels 235 elasticsearch on

Install Kibana 4.1.x

cd ~; curl -O https://download.elastic.co/kibana/kibana/kibana-4.1.1-linux-x64.tar.gz

tar xvf kibana-4.1.1-linux-x64.tar.gz

– Edit kibana.yml config file and update host: “0.0.0.0” to host: “localhost”

sudo vi kibana-4.1.1-linux-x64/config/kibana.yml

– Copy kibana files to the opt directory

sudo mkdir -p /opt/kibana

sudo cp -R ~/kibana-4.1.1-linux-x64/* /opt/kibana/

– Now lets configure kibana to start as a service by running following cammands

sudo wget --output-document="/etc/init.d/kibana" https://raw.githubusercontent.com/cjcotton/init-kibana/master/kibana

sudo chmod +x /etc/init.d/kibana

– Edit /etc/init.d/kibana and change path to Kibana bin directory and also account to run the service as

KIBANA_BIN=/opt/kibana/bin/

DAEMON_USER=kibana_user

– Start Kibana service

/etc/init.d/kibana start

– Now all you need to do is access your kibana page with following URL:

http://:5601

Note:

You can install nginx and configure it to act as a proxy so you only need to access kibana via port 80. if you need to know how to do that, feel free to let me know and i will show you how to.

 
comments powered by Disqus