Kibana Debian packages can be downloaded from our website or from our APT repository. It can be used to install Kibana on any Debian-based system, such as Debian and Ubuntu.

The package includes both free and subscription capabilities. Start a 30-day trial to try out all features.

The latest stable version of Kibana can be found on the Download Kibana page. Other versions can be found on the past version page.

The premise condition

Since Kibana works with Elasticsearch, you will need to install the version of Elasticsearch that matches Kibana before you can install It. If you haven’t already installed your own Elasticsearch, please refer to my previous article “Elasticsearch: Installing Elasticsearch 8.x using the Debian installation package”.

Import the Elastic PGP key

We sign all of our packages using a fingerprint Elastic signature key (PGP key D88E42B4, available at pgp.mit.edu) :

4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
Copy the code

Download and install the public signing key:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
Copy the code

Install from APT repository

Before proceeding, you may need to install the apt-transport-https package on Debian:

sudo apt-get install apt-transport-https
Copy the code

Defines the repository saved to the/etc/apt/sources list. D/elastic – 8. X.l ist:

echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list
Copy the code

Warning: If you have already installed Elasticsearch as you did in the previous installment “Elasticsearch: Using the Debian installer to install Elasticsearch 8.x”, please ignore the above step. Otherwise you’ll be in the/etc/apt/sources list. D/elastic – 8 x.l ist generated in duplicate entries.

Warning: Do not use add-apt-repository because it also adds a deb-src entry, but we do not provide the source package. If you add deb-src entry, you will see the following error:

Unable to find expected entry 'main/source/Sources' in Release file
(Wrong sources.list entry or malformed file)
Copy the code

Remove the deb-src entry from the /etc/apt/sources.list file and the installation should proceed as expected.

You can install the Kibana Debian package using the following command:

sudo apt-get update && sudo apt-get install kibana
Copy the code

Warning: If the same Kibana storage inventory is in two entries, you will see the following error during apt-get Update:

Duplicate sources.list entry https://artifacts.elastic.co/packages/8.x/apt/ ... ` check/etc/apt/sources list. D/elastic - 8 x.l ist in duplicate entries or in/etc/apt/sources list. D/and/etc/apt/find repeating entry source files in the list file.Copy the code

We can check the running status of Kibana service in the following ways:

1. parallels@liuxg:~$service kibana status 2. loaded (/lib/systemd/system/kibana.service; disabled; vendor preset: enabled) 4. Active: inactive (dead) 5. Docs: https://www.elastic.coCopy the code

It shows that the Kibana service has not been started. We have the following two ways to start the Kibana service:

1) Run Kibana using Systemd

To configure Kibana to start automatically when the system starts, run the following command:



1.  sudo /bin/systemctl daemon-reload
2.  sudo /bin/systemctl enable kibana.service


Copy the code

Kibana can be started and stopped as follows:



1.  sudo systemctl start kibana.service
2.  sudo systemctl stop kibana.service


Copy the code

These commands do not provide feedback on whether Kibana has been successfully launched. Log information can be accessed by journalctl -u kibana.service.

2) Directly launch the Kibana service

Sometimes we don’t want to automatically start the Kibana service when the machine starts up. We can start the Kibana service when needed:

sudo service kibana start
Copy the code

To check the running status of the Kibana service, run the following command:

service kibana status
Copy the code

It shows that the Kibana service is running.

We can visit http://localhost:5601 in the browser:

Above, it asks us to enter an enrollment token. So how can we obtain the enrollment token?

Elasticsearch: Install Elasticsearch 8.x from the Debian installation package

In the output above, it explicitly tells us how to obtain the generation of the Enrollment token. We use the following command:

sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
Copy the code
1. parallels@liuxg:~$ sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana 2. eyJ2ZXIiOiI4LjEuMCIsImFkciI6WyIxOTIuMTY4LjAuMTA6OTIwMCJdLCJmZ3IiOiIzOTBhZWY5MmJjM2JlOGFiZDJhODY3MDRhOTE4YTA3MGY2ZTYxOGI0 NWQxMGE0ZWI1ODMxODM0ZmQzODVjODA5Iiwia2V5IjoiOVl2U2xuOEJEQ0twNll5cXVUZHg6ZWF6dUNQR3FSS3FuTkZLQzRHTG9xUSJ9Copy the code

Please note that the above token is only valid for 30 minutes. We have to use it within 30 minutes. Otherwise, we need to retrieve.

Enter your earned token into the box above and click Configure Elastic:

 

We need to get verification-code. We can obtain it in the following way:

1. parallels@liuxg:~$ journalctl -u kibana.service 2. -- Logs begin at Sat 2021-03-13 16:28:18 CST, end at Thu 2022-03-17 15:43:28 CST. -- 3. Mar 17 15:35:55 liuxg systemd[1]: Started Kibana. 4. Mar 17 15:36:00 liuxg kibana[43727]: [2022-03-17T15:36:00.471+08:00][INFO][plugins-service] Plugin "metricsEntities" I > 5.mar 17 15:36:00 LIUxg kibana[43727]: [2022-03-17T15:36:00.516+08:00][INFO][http.server.Preboot] HTTP Server running at> 6.mar 17 15:36:00 LIUxg kibana[43727]: [2022-03-17T15:36:00.533+08:00][INFO][plugins-system.preboot] Setting up [1] Plug > 7.mar 17 15:36:00 LIUxg kibana[43727]: [2022-03-17T15:36:00.534+08:00][INFO][preboot] "interactiveSetup" plugin is Holdi > 8.mar 17 15:36:00 LIUxg kibana[43727]: [2022-03-17T15:36:00.548+08:00][INFO][root] Holding setup until preboot stage is > 9.mar 17 15:36:00 liuxg kibana[43727]: i Kibana has not been configured. 10. Mar 17 15:36:00 liuxg kibana[43727]: Go to http://localhost:5601/? code=140472 to get started. 11. Mar 17 15:43:28 liuxg kibana[43727]: Your verification code is: 140 472Copy the code

As shown above, the verification code is 140 472. Fill in this verification code in the screen above:

 

Enter the password of the elastic superuser. You can see this when you started Elasticsearch earlier. Click Log in:

So we logged into Kibana.

Download the Debian installation package and install it manually

The Debian package for Kibana V8.1.0 can be downloaded from the website and installed as follows:

1. Wget https://artifacts.elastic.co/downloads/kibana/kibana-8.1.0-amd64.deb 2. 512 kibana shasum - a - 8.1.0 - amd64. Deb 3. Sudo DPKG -i kibana - 8.1.0 - amd64. DebCopy the code

The steps for generating enrollment tokens and logging in to Kibana are the same as above.

Configure Kibana using the config file

Kibana loads its configuration by default from the /etc/kibana/kibana.yml file. The format of this configuration file is explained in Configuring Kibana.