目录标题
搭建es集群
1. 拉取elasticsearch
docker pull elasticsearch:6.7.1
2. 查看镜像
docker images

3. 在宿主机上建立配置文件
cd /Users/admin/Documents/ES/config
vi es1.yml
vi es2.yml
vi es3.yml
4. yml内容如下
es1.yml
cluster.name: elasticsearch-cluster
node.name: es-node1
network.host: 0.0.0.0
#network.publish_host: 127.0.0.1
http.port: 9201
transport.tcp.port: 9301
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["127.0.0.1:9301","127.0.0.1:9302","127.0.0.1:9303"]
discovery.zen.minimum_master_nodes: 1
**es2.yml**
cluster.name: elasticsearch-cluster
node.name: es-node2
network.host: 0.0.0.0
#network.publish_host: 127.0.0.1
http.port: 9202
transport.tcp

本文详细介绍如何从零开始搭建Elasticsearch集群,包括拉取镜像、配置文件设置、启动命令及验证安装。同时,深入讲解安装和测试IK分词器的方法,确保中文文本分析的准确性。
最低0.47元/天 解锁文章
1433

被折叠的 条评论
为什么被折叠?



