Created on 03-08-2017 08:35 PM
For this tutorial we will be using Ubuntu 14.04.5. This setup can further be leveraged with Apache Metron (Incubating). Additional installation instructions for Metron core will be provided in another article.
First we'll install Elasticsearch 2.4. You'll need the following prerequisites:
You can install them by logging into your ES node and executing the following:
sudo apt-get update sudo apt-get install -y wget apt-transport-https # If using oracle jdk 8 sudo apt-get install -y software-properties-common sudo apt-add-repository -y ppa:webupd8team/java sudo apt-get update echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections sudo apt-get install -y oracle-java8-installer
Now let's install Elasticsearch. Run the following commands on the node where you want to install ES.
# Get the Elasticsearch packages wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - # Add the Elasticsearch packages to apt echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list # Install Elasticsearch sudo apt-get update && sudo apt-get install elasticsearch # Configure for automatic start on system boot for System V systems sudo update-rc.d elasticsearch defaults 95 10 # Start Elasticsearch sudo service elasticsearch start
If you're running this in Docker, you'll also want to run the following before starting the es service:
# Setup networking echo 'network.host: 0.0.0.0' >> /etc/elasticsearch/elasticsearch.yml
Check that Elasticsearch is running. Go to http://$ELASTICSEARCH_HOST:9200 and verify you see something like the following:
{ "name" : "Saturnyne", "cluster_name" : "metron", "cluster_uuid" : "F-m2WjlDSAu_0TTCqXki1w", "version" : { "number" : "2.4.4", "build_hash" : "fcbb46dfd45562a9cf00c604b30849a6dec6b017", "build_timestamp" : "2017-01-03T11:33:16Z", "build_snapshot" : false, "lucene_version" : "5.5.2" }, "tagline" : "You Know, for Search" }
Now we'll install Kibana 4.5.3 on Ubuntu 14.04.5. First you should have the following prerequisites:
You can install them by logging into your Kibana node and executing the following:
sudo apt-get update sudo apt-get install -y wget
Now let's install Kibana. Run the following commands on the node where you want to install Kibana.
# Get the Elasticsearch/Kibana packages wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - # Add the Kibana packages to apt echo "deb http://packages.elastic.co/kibana/4.5/debian stable main" | sudo tee -a /etc/apt/sources.list # Install Kibana sudo apt-get update && sudo apt-get install kibana # Configure for automatic start on system boot sudo update-rc.d kibana defaults 95 10 # Configure Kibana for Elasticsearch host:port # Note: set the host and port accordingly to point to your Elasticsearch host from the installation above. sed -ri "s;^(\#\s*)?(elasticsearch\.url:).*;\2 'http://elasticsearch:9200';" /opt/kibana/config/kibana.yml # Start Kibana export PATH=/opt/kibana/bin:$PATH kibana
That should be it. Now you should be able to go to http://$KIBANA_HOST:5601 and see the Kibana dashboard.
If you're looking to get a quick demo environment running, you can follow these steps to run this example in Docker. For this part we'll be using Docker for Mac on Mac OSX 10.12.
You should now have two running Docker containers that you are able to connect to from your localhost.
Note: There are currently limitations with Docker for Mac networking. Alternatively, you could use docker-machine for a more robust example.
Reference
Created on 03-09-2017 01:34 PM
Hi @Michael Miklavcic, thanks for the article.
On my Ubuntu 14.04 openstack cluster, I was unable to start elasticsearch service after following the steps. It was failing with and error saying NoSuchFileException: /usr/share/elasticsearch/config
. I had to follow the workaround in this article in order to have the services started successfully.
I did not have any issues with the Kibana install. It worked fine.
Created on 03-10-2017 12:51 AM
Thanks for checking this out!