Installation of Kibana on Ubuntu Server
Kibana is an open-source data visualization and analysis platform used to visualize Elasticsearch data. Elasticsearch and Kibana together form the Elastic stack. In this tutorial, we will guide you through the process of installing Kibana on Ubuntu Server.
Prerequisites
Before we begin, you need to have the following prerequisites:
- Ubuntu Server Latest version
- Java Development Kit (JDK) 11 or above
- Elasticsearch installed on the system
Step 1: Install Java Development Kit (JDK)
Kibana runs on Java. Ensure that you have Java Development Kit (JDK) 11 or above installed. To install JDK 11 or above, follow the steps below:
Check if Java already exists on your system by running the following command:
java -versionIf Java is not installed, run the following command:
sudo apt-get update && sudo apt-get install openjdk-11-jdk -yVerify that the installation was successful by running the following command:
java -versionThis should return the version of the installed JDK.
Step 2: Install Kibana
Follow the steps below to install Kibana on Ubuntu Server:
Download the Kibana package from the official website https://www.elastic.co/downloads/kibana
Once the download completes, extract the package using the following command:
tar -xvf kibana-<version>-linux-x86_64.tar.gzMove the extracted package to the
/optdirectory:sudo mv kibana-<version>-linux-x86_64 /opt/kibanaChange the directory to
/opt/kibanacd /opt/kibana
Step 3: Configure Kibana
Once Kibana is installed, you need to configure it to work with Elasticsearch. Follow the steps below to configure Kibana:
Open the Kibana configuration file
/opt/kibana/config/kibana.ymland update the Elasticsearch URL.sudo nano /opt/kibana/config/kibana.ymlUpdate the following lines:
elasticsearch.hosts: ["http://localhost:9200"]Change the
localhostto the IP address or hostname where Elasticsearch is installed.Save and close the file
Create a systemd service file to start, stop, and manage the Kibana process.
sudo nano /etc/systemd/system/kibana.serviceAdd the following configuration to the
kibana.servicefile:[Unit] Description=Kibana After=network.target [Service] Environment=NODE_OPTIONS="--max-old-space-size=512" ExecStart=/opt/kibana/bin/kibana Restart=always User=root Group=root LimitNOFILE=65536 [Install] WantedBy=multi-user.targetSave and close the file
Reload systemd manager configuration:
sudo systemctl daemon-reloadEnable and start Kibana service:
sudo systemctl enable kibana.service sudo systemctl start kibana.service
Step 4: Access Kibana
To access Kibana, open a web browser and enter the IP address of the Ubuntu Server and port number 5601 in the address bar:
http://server-ip:5601
You should see the Kibana login screen, and you can log in with the default credentials:
username: elastic
password: changeme
Once you are logged in, you are ready to start creating visualizations and dashboards using Elasticsearch data.
Conclusion:
In this tutorial, we have demonstrated how to install Kibana on Ubuntu Server. You can now start visualizing and analyzing Elasticsearch data using Kibana.