The following pieces of software need to be installed before installing Kibana 4.1.1:
The installation process will be covered separately for Windows and Ubuntu so that both types of users are able to understand the process of installation easily.
In this section, JDK needs to be installed so as to access Elasticsearch. Oracle Java 8 (update 20 onwards) will be installed as it is the recommended version for Elasticsearch from version 1.4.4 onwards.
Install Java 8 using the terminal and the apt package in the following manner:
apt
repository list:sudo add-apt-repository -y ppa:webupd8team/java
As shown in the preceding screenshot, you will initially be prompted for the password for running the sudo
command (only when you have not logged in as root), and on successful addition to the repository, you will receive an OK
message, which means that the repository has been imported.
apt
package database to include all the latest files under the packages:sudo apt-get update
sudo apt-get -y install oracle-java8-installer
Also, during the installation, you will be prompted to accept the license agreement, which pops up as follows:
java –version
We can install Java on windows by going through the following steps:
.exe
file, as shown here:JAVA
in the environment variable settings of Windows. Firstly, open the properties of My Computer. Select the Advanced system settings and then click on the Advanced tab, wherein you have to click on the environment variables option, as shown in this screenshot:After opening Environment Variables, click on New (under the System variables) and give the variable name as JAVA_HOME
and variable value as C:Program FilesJavajdk1.8.0_45
(do check in your system where jdk
has been installed and provide the path corresponding to the version installed as mentioned in system directory), as shown in the following screenshot:
Then, double-click on the Path variable (under the System variables) and move towards the end of textbox. Insert a semicolon if it is not already inserted, and add the location of the bin
folder of JDK, like this: %JAVA_HOME%in
. Next, click on OK in all the windows opened.
java –version
This signifies that Java has been installed successfully.
In this section, Elasticsearch, which is required to access Kibana, will be installed. Elasticsearch v1.5.2 will be installed, and this section covers the installation on Ubuntu and Windows separately.
To install Elasticsearch on Ubuntu, perform the following steps:
.tar
file using the following command on the terminal:curl -L -O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.tar.gz
.tar
file using this command:tar -xvzf elasticsearch-1.5.2.tar.gz
This will extract the files and folder into the current working directory.
bin
directory within the elasticsearch-1.5.2
directory:cd elasticsearch-1.5.2/bin
./elasticsearch
The preceding screenshot shows that the Elasticsearch node has been started, and it has been given a random Marvel Comics character name.
http://localhost:9200
in your browser.The installation on Windows can be done by following similar steps as in the case of Ubuntu. To use curl
commands on Windows, we will be installing GIT. GIT will also be used to import a sample JSON file into Elasticsearch using elasticdump
, as described in the Importing a JSON file into Elasticsearch section.
To run curl
commands on Windows, first download and install GIT, then perform the following steps:
The following are the steps required to install Elasticsearch on Windows:
curl –L –O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.zip
unzip elasticsearch-1.5.2.zip
This will extract the files and folder into the directory.
bin
folder.elasticsearch.bat
file to run Elasticsearch.The preceding screenshot shows that the Elasticsearch node has been started, and it is given a random Marvel Comics character's name.
http://localhost:9200
in your browser.In this section, Kibana will be installed. We will install Kibana v4.1.1, and this section covers installations on Ubuntu and Windows separately.
To install Kibana on Ubuntu, follow these steps:
.tar
file using the following command in the terminal:curl -L -O https://download.elasticsearch.org/kibana/kibana/kibana-4.1.1-linux-x64.tar.gz
.tar
file using this command:tar -xvzf kibana-4.1.1-linux-x64.tar.gz
The preceding command will extract the files and folder into the current working directory.
bin
directory within the kibana-4.1.1-linux-x64
directory:cd kibana-4.1.1-linux-x64/bin
./kibana
http://localhost:5601
in your browser.To install Kibana on Windows, perform the following steps:
curl -L -O https://download.elasticsearch.org/kibana/kibana/kibana-4.1.1-windows.zip
unzip kibana-4.1.1-windows.zip
This will extract the files and folder into the directory.
bin
folder.kibana.bat
file to run Kibana.http://localhost:5601
in your browser.You can change the Elasticsearch configuration for your production environment, wherein you have to change parameters such as the cluster name, node name, network address, and so on. This can be done using the information mentioned in the upcoming sections.
To change the Elasticsearch configuration, perform the following steps:
sudo vi ~/elasticsearch-1.5.2/config/elasticsearch.yml
Windows users can open the elasticsearch.yml
file from the config
folder. This will open the configuration file as follows:
#cluster.name: elasticsearch to cluster.name: "your_cluster_name".
In the preceding figure, the cluster name has been changed to test
. Then, we save the file.
Then open http://localhost:9200
in the browser to verify, as shown here:
In the preceding screenshot, you can notice that cluster_name
has been changed to test
, as specified earlier.
To change the Kibana configuration, follow these steps:
sudo vi ~/kibana-4.1.1-linux-x64/config/kibana.yml
Windows users can open the kibana.yml
file from the config
folder.
In this file, you can change various parameters such as the port on which Kibana works, the host address on which Kibana works, the URL of Elasticsearch that you wish to connect to, and so on.
port: 5601
can be changed to any other port, such as port: 5604
. Then we save the file.5604
, run Kibana as mentioned earlier. Then open http://localhost:5604
in the browser to verify, as follows:In the preceding screenshot, notice that Kibana is working on port 5604
, as per our change.
3.146.37.250