栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

ElasticSearch系列:docker之简单部署

ElasticSearch系列:docker之简单部署

一、前言

二、下载镜像

[root@i-slebi7x6 bin]# docker pull elasticsearch:7.16.3
7.16.3: Pulling from library/elasticsearch
ea362f368469: Pull complete
0ccee306c4da: Pull complete
28688537d02c: Pull complete
aa5fb23d065d: Pull complete
89f4c512861d: Pull complete
bfcc724c6288: Pull complete
abb0ba51c947: Pull complete
5f53dd95410f: Pull complete
4b3820751286: Pull complete
Digest: sha256:de5474d051409e8222eee30c82ef299f3f3c97bb339bbd19c314178db659f7b4
Status: Downloaded newer image for elasticsearch:7.16.3
docker.io/library/elasticsearch:7.16.3

三、简单部署

首先根据自己的需求修改一下config目录下的jvm.options的JVM配置。

################################################################
##
## JVM configuration
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/jvm-options.html
## for more information.
##
################################################################



################################################################
## importANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## and the min and max should be set to the same value. For
## example, to set the heap to 4 GB, create a new file in the
## jvm.options.d directory containing these lines:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/heap-size.html
## for more information
##
################################################################

-Xms1g
-Xmx1g

如果端口无需修改,则不用配置elasticsearch.yml。可以直接启动即可。

docker run -d --name es2 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.16.3

三、测试是否启动

在浏览器输入 ip + 端口号。

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/720809.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号