MirrorNest
← Tous les guides

Elasticsearch

A distributed search and analytics engine — the backbone of full-text search features and, paired with Kibana and Logstash/Beats, one of the most common self-hosted log-aggregation stacks (the 'ELK stack').

Système : Any Docker hostsearch-enginelog-aggregationDockerSite officiel ↗Documentation officielle ↗
Ce guide est élaboré à partir de la documentation officielle de Elasticsearch, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
  1. 1Run a single-node instance

    Security is enabled by default from Elasticsearch 8 onward -- this generates a real password you'll need to save.

    docker run -d \ --name elasticsearch \ -p 9200:9200 \ -e discovery.type=single-node \ -v ./elasticsearch/data:/usr/share/elasticsearch/data \ --restart unless-stopped \ docker.elastic.co/elasticsearch/elasticsearch:8.15.0
  2. 2Retrieve the auto-generated elastic user password

    docker exec -it elasticsearch /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
  3. 3Verify it's running

    curl -k -u elastic:your-password https://localhost:9200
  4. 4Add Kibana for visualization (optional)

    Kibana provides the web dashboard most people associate with 'the ELK stack' -- browsing, searching, and graphing whatever data is indexed into Elasticsearch.