Install Elasticsearch and Kibana 8 in notime and take a peek at the latest improvements

This installation guide takes Ubuntu 18.04 LTS as a base. Therefore deb-packages are used. The whole installation process is also well documented in the official documentation. I hope this condensed installation guide can save you time.

Download Elasticsearch 8

Open a terminal, add the PGP-key, add the repo for ELK8 and install Elasticsearch:

wget -qO - | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list

sudo apt-get update && \
    sudo apt-get install elasticsearch=8.0.0 && \
    sudo apt-mark hold elasticsearch

Save the Security autoconfig information

This is important. Save the following information that the installation routine has dumped to the console, you will need it later:

The generated password for the elastic built-in superuser is : 44TDAhD5bo9kHbqZYS*j

If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.

You can complete the following actions at any time:

Reset the password of the elastic built-in superuser with 
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.

Generate an enrollment token for Kibana instances with 
 '/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.

Generate an enrollment token for Elasticsearch nodes with 
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.

Configure and start Elasticsearch

Reload the systemctl-daemon:

sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service

Now change the yml-file /etc/elasticsearch/elasticsearch.yml in this manner: cluster_3 srvelk8 /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
http.port: 9200 true true
  enabled: true
  keystore.path: certs/http.p12
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
cluster.initial_master_nodes: ["srvelk8"] [_local_, _site_] [_local_, _site_]

Make sure that your local /etc/hosts file (and the /etc/hosts file on the workstation that will access Kibana) has an entry for your host like (add you IP address, Elastic wants also a valid DNS format, you cannot shortcut it): srvelk8

Now start Elasticsearch:

systemctl start elasticsearch

Install, configure and start Kibana

In case of trouble, you might find answers in the official documentation. Now install Kibana:

sudo apt-get update && sudo apt-get install kibana=8.0.0 && sudo apt-mark hold kibana

As soon as the installation is done, create the enrollment token for Kibana:

/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana

Save the token, you will need it later for login into Kibana.

Change /etc/kibana/kibana.yml:

server.port: 5601 "" "srvelk8"
elasticsearch.hosts: ["http://localhost:9200"]
      type: file
      fileName: /var/log/kibana/kibana.log
        type: json
      - default
      - file
pid.file: /run/kibana/

Start Kibana:

sudo systemctl daemon-reload && sudo systemctl start kibana
systemctl status kibana

After a few seconds, you should see with “systemctl status Kibana” the following log entry:

Feb 12 10:37:31 srvelk8 kibana[4936]: i Kibana has not been configured.
Feb 12 10:37:31 srvelk8 kibana[4936]: Go to to get started.

Open that link and paste the Kibana enrollment token:

Image by author

Press “Configure Elastic” and wait until the cluster is configured. Now log in with ‘elastic’ and the password that was provided, after you installed Elasticsearch:

Image by author


Image by author

Now go to “Stack Management” -> “Users” and create your user. Add the “superuser” role:

Image by author

Log out and log in with your newly created user again:

Log out:

And login again with your newly created user:

And that’s it! Congrats if you made it until here, enjoy your new Elastic-Cluster!

Schreibe einen Kommentar