Trinn 1:Importer signeringsnøkkel for Elasticsearch-pakke
``` bash
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
```
Trinn 2:Legg til Elasticsearch-depot
``` bash
sudo apt installer apt-transport-https
echo "deb https://artifacts.elastic.co/packages/8.x/apt stabil main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
```
Trinn 3:Installer Elasticsearch
``` bash
sudo apt update &&sudo apt install elasticsearch
```
Trinn 4:Aktiver Elasticsearch
``` bash
sudo systemctl daemon-reload
sudo systemctl aktivere elasticsearch.service
```
Trinn 5:Start Elasticsearch
``` bash
sudo systemctl start elasticsearch.service
```
Trinn 6:Bekreft installasjonen av Elasticsearch
``` bash
curl -X FÅ http://localhost:9200
```
Du bør få et svar som dette:
```
{
"name" :"Elasticsearch",
"cluster_name" :"elasticsearch_ubuntu",
"cluster_uuid" :"sN-jN-75SbWj1fI_rZc81g",
"versjon" :{
"nummer" :"8.2.4",
"build_flavor" :"standard",
"build_type" :"dokker",
"build_hash" :"3f4c3a9c5f5c1f4c4b3c4a9a4f400f45aecb0b3e",
"build_date" :"2021-06-29T09:02:10.123125Z",
"build_snapshot" :false,
"lucene_version" :"8.10.1",
"minimum_wire_compatibility_version" :"7.12.0",
"minimum_index_compatibility_version" :"6.0.0-beta1"
},
"tagline" :"Du vet, for søk"
}
```