Étape 1 :Importer la clé de signature du package Elasticsearch
```bash
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key ajouter -
```
Étape 2 : Ajouter le référentiel Elasticsearch
```bash
sudo apt install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
```
Étape 3 :Installer Elasticsearch
```bash
sudo apt update &&sudo apt installer elasticsearch
```
Étape 4 :Activer Elasticsearch
```bash
sudo systemctl démon-reload
sudo systemctl activer elasticsearch.service
```
Étape 5 :Démarrez Elasticsearch
```bash
sudo systemctl démarrer elasticsearch.service
```
Étape 6 :Vérifier l'installation d'Elasticsearch
```bash
curl -X OBTENIR http://localhost:9200
```
Vous devriez obtenir une réponse comme celle-ci :
```
{
"nom" :"Elasticsearch",
"nom_cluster" :"elasticsearch_ubuntu",
"cluster_uuid" :"sN-jN-75SbWj1fI_rZc81g",
"version" :{
"numéro" :"8.2.4",
"build_flavor" :"par défaut",
"build_type" :"docker",
"build_hash" :"3f4c3a9c5f5c1f4c4b3c4a9a4f400f45aecb0b3e",
"build_date" :"2021-06-29T09:02:10.123125Z",
"build_snapshot" :faux,
"lucene_version" :"8.10.1",
"minimum_wire_compatibility_version" :"7.12.0",
"minimum_index_compatibility_version" :"6.0.0-beta1"
},
"tagline" :"Vous savez, pour la recherche"
}
```
|