MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Kibana 7.2 Install and configuration in RHEL 7/Centos

This guide covers installing Kibana 7.2 on RHEL 7 or CentOS 7 from the tar.gz archive, pointing it at an Elasticsearch cluster in kibana.yml, and starting it. Below the original steps you will find the fixes those steps need, a packaged RPM install, a systemd service, firewall rules, how to check that it works, and the errors people hit most often.

Install and Setup JDK 8+

cd 
yum install wget -y
wget https://download.java.net/java/GA/jdk12.0.1/69cfe15208a647278a19ef0990eea691/12/GPL/openjdk-12.0.1_linux-x64_bin.tar.gz
tar -zxvf openjdk-12.0.1_linux-x64_bin.tar.gz
export JAVA_HOME=/home/ec2-user/d/jdk-12.0.1
export PATH=$PATH:$JAVA_HOME/bin
Code language: JavaScript (javascript)

Download and Install Kibana 7.X

cd
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.2.0-linux-x86_64.tar.gz
tar -xzf kibana-7.2.0-linux-x86_64.tar.gzCode language: JavaScript (javascript)

Configure Kibana 7.X

cd kibana-7.2.0-linux-x86_64/ 
vi config/kibana.yml
& change follwing and uncomment it.....
------
# Ip address of server where you are installing Kibana
server.host: "172.31.28.227"

# Ip address of elastic search custor client ip 
elasticsearch.hosts: ["http://172.31.11.126:9200"]Code language: PHP (php)

How to start kibana service?

# Ip address of server where you are installing Kibana
server.host: "172.31.28.227"
./bin/kibana
OR
nohup ./bin/kibana &

# To see below process for the user which is starting kibana : ps -ef | grep -u user
user 23101 1 0 Mar01 ? 00:21:23 ./../node/bin/node ./../src/cliCode language: PHP (php)

Before you start

Kibana is the web interface for Elasticsearch. It is a Node.js application, and every Kibana download comes with its own Node.js runtime. It does not store data. Everything it shows comes from an Elasticsearch cluster, so you need a working Elasticsearch node that the Kibana server can reach.

  • A RHEL 7 or CentOS 7 host with at least 2 GB of RAM. Kibana 7.x does a lot of work when it first starts.
  • A running Elasticsearch node of the same version as Kibana. For Kibana 7.2.0, that means Elasticsearch 7.2.0.
  • Network access from the Kibana host to Elasticsearch on port 9200, and from your browser to Kibana on port 5601.
  • A non-root user with sudo rights. Kibana 7.x refuses to run as root unless you pass --allow-root, and you should not pass it.

Note: Kibana 7.2 has been end of life for a long time, and CentOS 7 reached end of life on 30 June 2024. Use these steps for labs or for existing 7.2 clusters. For a new deployment, use a supported Elastic release on a supported operating system. The repository method below works the same way: change the version in the repo path.

Corrections to the steps above

Several of the original commands fail or mislead if you copy them as they are.

OriginalProblemFix
Install JDK 12Kibana does not use Java. It ships with its own Node.js. Elasticsearch 7.x also comes with its own JDK.Skip the JDK step on the Kibana host.
JAVA_HOME=/home/ec2-user/d/jdk-12.0.1cd followed by tar extracts into ~/jdk-12.0.1. The path has an extra d/ directory, and export only lasts for the current shell.Not needed for Kibana. If another tool needs Java, use yum install java-11-openjdk.
server.host line inside the start commandsThat is a YAML setting, not a shell command. Pasting it into a shell gives command not found.Set it only in config/kibana.yml.
nohup ./bin/kibana &Writes output to nohup.out, does not restart after a crash or reboot, and runs as whatever user launched it.Run Kibana as a systemd service under its own user (see below).
ps -ef | grep -u user-u is not a user filter for grep.ps -fu kibana or pgrep -af kibana
# Show processes owned by the kibana user (Kibana runs as node)
ps -fu kibana

# Confirm Kibana is listening on port 5601
sudo ss -ltnp | grep 5601Code language: PHP (php)

Configure kibana.yml properly

By default server.host is localhost, so Kibana cannot be reached from any other machine. Set it to an IP address that exists on this host, or to 0.0.0.0 to listen on every interface. On AWS EC2, use the private IP. The public IP is not attached to the instance's network interface, so Kibana cannot bind to it.

# config/kibana.yml (tarball) or /etc/kibana/kibana.yml (RPM)
server.port: 5601
server.host: "172.31.28.227"        # or "0.0.0.0"
server.name: "kibana-01"

# One or more Elasticsearch nodes, same version as Kibana
elasticsearch.hosts: ["http://172.31.11.126:9200"]

# Only if Elasticsearch security is enabled (7.2 built-in user is 'kibana')
#elasticsearch.username: "kibana"
#elasticsearch.password: "changeme"

# Optional: write logs to a file instead of stdout
#logging.dest: /var/log/kibana/kibana.logCode language: PHP (php)

YAML needs a space after each colon, and setting lines must start at the beginning of the line once you uncomment them. On the Elasticsearch side, network.host in elasticsearch.yml must be set to an address Kibana can reach. If Elasticsearch listens only on localhost, a remote Kibana cannot connect to it.

Run the tarball install as a systemd service

To keep the archive install, move it to a fixed location, run it as a dedicated user, and let systemd start it at boot and restart it if it crashes.

sudo useradd -r -s /sbin/nologin kibana
sudo mv ~/kibana-7.2.0-linux-x86_64 /opt/kibana
sudo chown -R kibana:kibana /opt/kibana

sudo tee /etc/systemd/system/kibana.service > /dev/null <<'EOF'
[Unit]
Description=Kibana
Wants=network-online.target
After=network-online.target

[Service]
User=kibana
Group=kibana
ExecStart=/opt/kibana/bin/kibana
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now kibana
sudo journalctl -u kibana -fCode language: JavaScript (javascript)

The chown matters because Kibana writes to its own data and optimize directories. If the service user cannot write there, startup fails with permission errors.

Alternative: install from the Elastic yum repository

The RPM package creates the kibana user and the systemd unit for you, keeps its configuration in /etc/kibana/kibana.yml, and updates through yum. On RHEL and CentOS this is usually the easier method.

sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

sudo tee /etc/yum.repos.d/kibana.repo > /dev/null <<'EOF'
[kibana-7.x]
name=Kibana repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF

# Pin the version so it matches Elasticsearch
sudo yum install -y kibana-7.2.0

sudo vi /etc/kibana/kibana.yml     # set server.host and elasticsearch.hosts
sudo systemctl daemon-reload
sudo systemctl enable --now kibanaCode language: PHP (php)

Note: A later yum update will upgrade Kibana to the newest 7.x release. If Elasticsearch is not upgraded at the same time, the versions no longer match. Add exclude=kibana to the repo file, or use yum versionlock, to control upgrades.

Open the firewall and verify

RHEL 7 and CentOS 7 run firewalld by default and block port 5601. On EC2, the security group also needs an inbound rule for 5601, ideally limited to your own IP range.

sudo firewall-cmd --permanent --add-port=5601/tcp
sudo firewall-cmd --reload

# From the Kibana host: can it reach Elasticsearch?
curl http://172.31.11.126:9200

# Is Kibana up? Look for an overall state of "green"
curl -s http://172.31.28.227:5601/api/statusCode language: PHP (php)

The first curl should return JSON that includes "number" : "7.2.0". The first start can take a minute or two while Kibana optimizes its bundles. After that, open http://<server-ip>:5601 in a browser to reach the Kibana home page.

Common errors and fixes

SymptomLikely causeFix
Kibana server is not ready yet in the browserKibana cannot reach Elasticsearch, or the versions do not matchCheck elasticsearch.hosts, test with curl, and read journalctl -u kibana
Unable to revive connection / No living connectionsElasticsearch is down, listens only on localhost, or port 9200 is blockedSet network.host on Elasticsearch and open 9200 between the two hosts
This version of Kibana requires Elasticsearch v7.2.0 on all nodesVersion mismatchInstall the Kibana version that matches the cluster
listen EADDRNOTAVAILserver.host is an IP that does not exist on this machine (often an EC2 public IP)Use the private IP or 0.0.0.0
Kibana should not be run as rootStarted as rootRun as the kibana user through systemd
Browser times out on port 5601server.host is still localhost, or firewalld or the security group blocks the portChange server.host and open 5601

Security notes

  • With the configuration above, anyone who can reach port 5601 has full access to your data. Do not expose it to the internet.
  • Elastic's basic (free) licence includes security from 7.1 onward. Set xpack.security.enabled: true on Elasticsearch, set passwords with bin/elasticsearch-setup-passwords, and set elasticsearch.username and elasticsearch.password in kibana.yml.
  • For browser HTTPS, set server.ssl.enabled, server.ssl.certificate and server.ssl.key, or put Kibana behind a reverse proxy that handles TLS and authentication.
  • Keep kibana.yml readable only by root and the kibana user, because it can contain credentials.

Frequently asked questions

Does Kibana need Java installed?

No. Kibana runs on Node.js, and every Kibana download includes its own Node.js runtime. Java is used by Elasticsearch and Logstash, and Elasticsearch 7.x also includes its own JDK.

Which Elasticsearch version works with Kibana 7.2?

Use the same version for both, so Elasticsearch 7.2.0 with Kibana 7.2.0. If Kibana finds Elasticsearch nodes with an incompatible version, it logs an error and does not become ready.

Why can't I open Kibana from my browser?

By default server.host is localhost, so Kibana only accepts local connections. Set it to the server's IP address or 0.0.0.0, then open port 5601 in firewalld and in any cloud security group.

Where are the Kibana logs?

When Kibana runs as a systemd service, its output goes to the journal. Read it with journalctl -u kibana. If you set logging.dest in kibana.yml, the logs go to that file instead.

What does 'Kibana server is not ready yet' mean?

Kibana is running but cannot finish starting because of a problem with Elasticsearch. Usually Elasticsearch is unreachable or the versions do not match. The Kibana logs show the exact cause.

Related tutorials

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

How to install Ansible in Centos 7/RHEL 7?

On CentOS 7 or RHEL 7 you can install Ansible in two ways: with yum from the EPEL repository, which gives you Ansible 2.9, or with pip…

Read More

Docker Tutorials: Installation and Configurations

Docker Installation in Centos/RHEL Method -1: How to install Docker Community Edition via YUM? Step 1 – Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data…

Read More

What is yum and use cases of yum?

What is yum? yum, short for Yellowdog Updater Modified, is a command-line package management utility for RPM (Red Hat Package Manager)-based Linux distributions, such as CentOS and…

Read More

Puppet Tutorials: Installing and Configure Puppet Server & Agent

Setting up Puppet Server in RHEL 8 / CENTOS 8 Setting up Puppet Agent in Linux Configure Puppet Agent with Server Rajesh Kumar I’m Rajesh Kumar, a…

Read More

Git Install and Upgrade from Source in RHEL / CENTOS

This tutorial will help you to install git 2.9.5 on CentOS/RHEL 7/6/5 and Fedora 26/25/24 operating systems using the source code. Step 1 โ€“ Install Required Packages…

Read More

Linux Tutorials: How to enable EPEL repository in redhat/Centos?

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Skylar Bennett
Skylar Bennett
3 months ago

The installation steps are useful, but one operational aspect that’s missing is configuration validation before exposing Kibana to users. In production, it’s a good practice to verify Elasticsearch connectivity, index health, and startup status through automated checks before allowing traffic to the Kibana UI. This prevents situations where the service is running but dashboards remain unusable because of backend connectivity issues, version mismatches, or unhealthy indices. Incorporating these validation steps into deployment automation can significantly reduce troubleshooting time and improve the reliability of Elastic Stack rollouts. 

1
0
Would love your thoughts, please comment.x
()
x