Kibana is a visualization tool used to interact with data stored in Elasticsearch. It is widely used for monitoring, searching, and analyzing data in real time. Installing Kibana on CentOS, RHEL, or Fedora can be done via the official Elastic repository, which ensures you have the latest stable release.

The installation process requires adding the official Elastic repository to your system’s package manager. By using yum or dnf, the RPM package for Kibana can be easily installed and kept up to date through regular system updates.

Once installed, Kibana requires configuration to connect to an Elasticsearch instance and can be set up to allow remote access. Proper firewall configuration is also necessary to ensure Kibana is accessible through its default port.

Steps to install Kibana on CentOS, RHEL, or Fedora:

  1. Create the Elastic yum repository on your system.
    $ sudo tee /etc/yum.repos.d/elasticsearch.repo <<EOF
    [elasticsearch-7.x]
    name=Elasticsearch 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
  2. Import the Elastic repository’s GPG key.
    $ sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
  3. Install the Kibana package using your package manager.
    $ sudo dnf install --assumeyes kibana
    Last metadata expiration check: 21:29:04 ago on Sat 01 May 2021 07:34:39 AM +08.
    Dependencies resolved.
    ======================================================================================
     Package         Architecture    Version             Repository                  Size
    ======================================================================================
    Installing:
     kibana          x86_64          7.12.1-1            elasticsearch-7.x          273 M
    
    Transaction Summary
    ======================================================================================
    Install  1 Package
    
    Total download size: 273 M
    Installed size: 690 M
    ##### snipped
  4. Open Kibana configuration file using your preferred text editor.
    $ sudo vi /etc/kibana/kibana.yml
  5. Uncomment and set server.host for remote access.
    server.host: "0.0.0.0" 
  6. Uncomment and set the elasticsearch.hosts to point to your Elasticsearch server.
    elasticsearch.hosts: ["http://127.0.0.1:9200"]
  7. Open the firewall for Kibana's default port (5601).
    $ sudo firewall-cmd --add-port=5601/tcp --permanent
    success
  8. Reload the firewall rules.
    $ sudo firewall-cmd --reload
    success
  9. Start Kibana service.
    $ sudo systemctl start kibana
  10. Enable Kibana to start at boot.
    $ sudo systemctl enable kibana
    Synchronizing state of kibana.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
    Executing: /usr/lib/systemd/systemd-sysv-install enable kibana
    Created symlink /etc/systemd/system/multi-user.target.wants/kibana.service → /etc/systemd/system/kibana.service.
  11. Verify Kibana by accessing it through a browser.
    $ curl -L 127.0.0.1:5601
    <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="viewport" content="width=device-width"/><title>Elastic</title><style>
            
            @font-face {
              font-family: 'Inter UI';
              font-style: normal;
              font-weight: 100;
    ##### snipped
Discuss the article:

Comment anonymously. Login not required.