{"id":334,"date":"2015-05-06T15:15:30","date_gmt":"2015-05-06T19:15:30","guid":{"rendered":"http:\/\/jackhanington.com\/blog\/?p=334"},"modified":"2015-06-16T14:51:34","modified_gmt":"2015-06-16T18:51:34","slug":"install-kibana-4-and-elasticsearch-on-ubuntu","status":"publish","type":"post","link":"https:\/\/jackhanington.com\/blog\/2015\/05\/06\/install-kibana-4-and-elasticsearch-on-ubuntu\/","title":{"rendered":"Install Kibana 4 and Elasticsearch on Ubuntu"},"content":{"rendered":"<p>Great news, everyone! Kibana 4 is no longer in beta and has been released to the masses.<\/p>\n<p>In this guide, I will show you how to get started installing Kibana 4 and Elasticsearch in a linux environment. I will be using Ubuntu Server 14.04 in my examples.<\/p>\n<p>For those who do not know, Kibana is an interface to data exploration through graphical\u00a0visualizations. \u00a0Kibana 4 is the latest release from the people over at <a href=\"https:\/\/www.elastic.co\/\">Elastic<\/a>. Kibana 4 offers a much better interface for sorting through your data.<\/p>\n<hr \/>\n<p><strong>Download and Install Java<\/strong><\/p>\n<p>If you are doing this on a fresh install of Ubuntu (like me), the first thing you&#8217;re going to need to do is install Java. Elasticsearch requires at least Java 7 to run so let&#8217;s set that up. I will be using Java 8 in this example but you can run 7 or openjdk if you wish.<\/p>\n<p>Open a terminal window (ctrl+shift+t) and type&#8230;<\/p>\n<pre>sudo apt-add-repository ppa:webupd8team\/java\r\nsudo apt-get update\r\nsudo apt-get install oracle-java8-installer<\/pre>\n<p>Once you have accepted the license agreement, Java is ready to go.<\/p>\n<hr \/>\n<p><strong>Download and Install Elasticsearch\u00a0<\/strong><\/p>\n<p>Open another terminal window (ctrl+alt+t) and type&#8230;<\/p>\n<pre>cd ~\r\nwget -O - http:\/\/packages.elasticsearch.org\/GPG-KEY-elasticsearch | sudo apt-key add -\r\necho 'deb http:\/\/packages.elasticsearch.org\/elasticsearch\/1.5\/debian stable main' | sudo tee \/etc\/apt\/sources.list.d\/elasticsearch.list\r\nsudo apt-get update\r\nsudo apt-get install elasticsearch<del>\r\n<\/del><\/pre>\n<p>That commands above will install Elasticsearch on your machine.<\/p>\n<p>The next thing we need to do is to give our Elasticsearch\u00a0cluster a name. To do this, type in this commands&#8230;<\/p>\n<pre>sudo sed -i -e 's|#cluster.name: elasticsearch|cluster.name: kibana|' \/etc\/elasticsearch\/elasticsearch.yml<\/pre>\n<p>Now you need to tell your machine to run Elasticsearch every time the machine boots up. To do that, type&#8230;<\/p>\n<pre>sudo update-rc.d elasticsearch defaults 95 10\r\nsudo \/etc\/init.d\/elasticsearch start<del>\r\n<\/del><\/pre>\n<p>And now you have Elasticsearch running on your machine. You can check by typing &#8220;sudo service elasticsearch status&#8221; in the terminal window, or by opening up a browser and going to http:\/\/127.0.0.1:9200 and seeing a result similar to this&#8230;<\/p>\n<pre>{\r\n  \"status\" : 200,\r\n  \"name\" : \"Karen Page\",\r\n  \"cluster_name\" : \"kibana\",\r\n  \"version\" : {\r\n    \"number\" : \"1.5.2\",\r\n    \"build_hash\" : \"62ff9868b4c8a0c45860bebb259e21980778ab1c\",\r\n    \"build_timestamp\" : \"2015-04-27T09:21:06Z\",\r\n    \"build_snapshot\" : false,\r\n    \"lucene_version\" : \"4.10.4\"\r\n  },\r\n  \"tagline\" : \"You Know, for Search\"\r\n}<\/pre>\n<hr \/>\n<p><strong>Download and Install Kibana 4<\/strong><\/p>\n<p>Now that Elasticsearch is installed on our machine, we can now go ahead and setup Kibana 4. Unlike previous versions of Kibana, Kibana 4 does not use apache to run.<\/p>\n<p>Open up another terminal window (ctrl+shift+t) and type in these commands&#8230;<\/p>\n<pre>cd ~\r\nwget https:\/\/download.elastic.co\/kibana\/kibana\/kibana-4.1.0-linux-x64.tar.gz\r\ntar xvf kibana-4.1.0-linux-x64.tar.gz\r\nsudo mv ~\/kibana-4.1.0-linux-x64 \/opt\/kibana\r\n<\/pre>\n<p>Now we need to have Kibana 4 start up when the machine boots so we need to have it run as a service. To do that, type in these commands in a terminal window&#8230;<\/p>\n<pre>sudo wget --output-document=\"\/etc\/init.d\/kibana4\" https:\/\/raw.githubusercontent.com\/akabdog\/scripts\/master\/kibana4_init\r\nsudo chmod +x \/etc\/init.d\/kibana4\r\nsudo update-rc.d kibana4 defaults 96 9\r\nsudo service kibana4 start\r\n<\/pre>\n<p>You can check to see if Kibana is working properly by goint to http:\/\/127.0.0.1:5601\/ in your browser of choice.\u00a0And that is in in terms of installing Kibana 4 and Elasticsearch. Part 2 of this blog post on setting up Logstash for your Cisco ASA syslogs is over <a href=\"https:\/\/jackhanington.com\/blog\/2015\/06\/16\/send-cisco-asa-syslogs-to-elasticsearch-using-logstash\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Great news, everyone! Kibana 4 is no longer in beta and has been released to the masses. In this guide, I will show you how to get started installing Kibana 4 and Elasticsearch in a linux environment. I will be using Ubuntu Server 14.04 in my examples. For those who do not know, Kibana is&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20,56,3,55,54],"tags":[80,81,77,58,78,59,117,76,79,57],"class_list":["post-334","post","type-post","status-publish","format-standard","hentry","category-blog","category-elasticsearch","category-information-technology","category-kibana","category-software","tag-cluster","tag-config","tag-download","tag-elasticsearch-2","tag-install","tag-java","tag-kibana","tag-kibana4","tag-terminal","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/posts\/334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/comments?post=334"}],"version-history":[{"count":9,"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/posts\/334\/revisions"}],"predecessor-version":[{"id":392,"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/posts\/334\/revisions\/392"}],"wp:attachment":[{"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/media?parent=334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/categories?post=334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jackhanington.com\/blog\/wp-json\/wp\/v2\/tags?post=334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}