Install Elasticsearch and Kibana on Debian/Ubuntu

From wikieduonline
Jump to navigation Jump to search
sudo apt-get install apt-transport-https
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt-get update && sudo apt-get install elasticsearch


For older Elastic 7 version use:

echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list

Elasticsearch[edit]

sudo apt-get update && sudo apt-get install elasticsearch
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl status elasticsearch.service

Kibana[edit]

sudo apt-get install kibana

sudo /bin/systemctl daemon-reload

sudo /bin/systemctl enable kibana.service

sudo systemctl start kibana.service

sudo systemctl status kibana.service

Access with user: elastic pass: you will find it on installation output


Connect Kibana to Elasticsearch:

/usr/share/kibana/bin/kibana-verification-code

Errors[edit]

E: The repository 'https://artifacts.elastic.co/packages/7.x/apt stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


W: GPG error: https://artifacts.elastic.co/packages/7.x/apt stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D27D666CD88E42B4
Solution:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys  D27D666CD88E42B4
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.nxEak71UaN/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 
D27D666CD88E42B4
gpg: key D27D666CD88E42B4: public key "Elasticsearch (Elasticsearch Signing Key) <[email protected]>" 
imported
gpg: Total number processed: 1
gpg:               imported: 1

Related terms[edit]

See also[edit]

Advertising: