Difference between revisions of "Install Elasticsearch and Kibana on Debian/Ubuntu"

From wikieduonline
Jump to navigation Jump to search
(Created page with "* https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html == See also == * {{ELK}} Category:ELK")
 
 
(42 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
* https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
 
* https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
  
 +
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 ==
 +
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 ==
 +
<code>sudo apt-get install [[kibana]]</code>
 +
 +
<code>sudo /bin/[[systemctl daemon-reload]]</code>
 +
 +
<code>sudo /bin/[[systemctl enable kibana.service]]</code>
 +
 +
<code>sudo [[systemctl start kibana.service]]</code>
 +
 +
<code>sudo [[systemctl status kibana.service]]</code>
 +
 +
Access with user: <code>[[elastic]]</code> pass: you will find it on installation output
 +
 +
 +
Connect Kibana to [[Elasticsearch]]:
 +
[[/usr/share/kibana/bin/kibana-verification-code]]
 +
 +
== Errors ==
 +
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 ==
 +
* <code>[[apt-key]]</code>
 +
* <code>deb [trusted=yes]</code>
 +
* <code>[[metricbeat setup --dashboards]]</code>
 +
* [[Grafana installation]]
 +
* <code>[[this elastic installation has strict security requirements]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{apt-key}}
 
* {{ELK}}
 
* {{ELK}}
  
  
 
[[Category:ELK]]
 
[[Category:ELK]]

Latest revision as of 14:44, 22 December 2022

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]

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: