ElasticSearch实战教程:ElasticSearch快速安装(1)

ElasticSearch实战教程:ElasticSearch快速安装(1)_第1张图片

一、前言

本小节介绍docker安装es过程,快速上手

二、Docker安装ElasticSearch实战

1.下载镜像

docker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.0

ElasticSearch实战教程:ElasticSearch快速安装(1)_第2张图片 

2.启动Elasticsearch

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.9.0

Elasticsearch 分web(9200)和tcp(9300)两种对外服务接口。 上面启动的esearch是容器名称,最后的elasticsearch是启动的镜像名称

3.docker ps查看启动镜像状态

正常运行

4.测试服务 

可浏览器访问 http://IP:9200/

{
  "name" : "8e91d24c9dbe",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "xEofx9bjRLeUbgXSsOPyfw",
  "version" : {
    "number" : "7.9.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "a479a2a7fce0389512d6a9361301708b92dff667",
    "build_date" : "2020-08-11T21:36:48.204330Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

ElasticSearch实战教程:ElasticSearch快速安装(1)_第3张图片

三、End 

以上是参考官方安装教程:https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

也可通过以下方法安装(类似

#检索镜像
docker search elasticsearch
#下载镜像
docker pull elasticsearch
#启动镜像
docker run -id --name esearch -p 9200:9200 -p 9300:9300 elasticsearch

 

你可能感兴趣的:(elasticsearch)