1.ElasticSearch
2.ElasticSearch-Head-Master
3.搭建集群(至少启动2个节点,否则集群连接不了)
---------------------------------------------------
1.下载ElasticSearch
https://www.elastic.co/cn/start
启动命令:
bin/elasticsearch.bat
访问:http://localhost:9200/
2.下载ElasticSearch-Head-Master
https://github.com/mobz/elasticsearch-head
启动命令:
npm install
npm install -g grunt-cli
npm run start
访问地址:http://localhost:9100/
--------------------------------------------------------------------------------------------------------
配置:
修改config/elasticsearch.yml文件
http.cors.enabled: true
http.cors.allow-origin: "*"
#节点1的配置信息:
#集群名称,保证唯一
cluster.name: my-elasticsearch
cluster.initial_master_nodes: ["node-1"]
#节点名称,必须不一样
node.name: node-1
#必须为本机的ip地址
network.host: 127.0.0.1
#服务端口号,在同一机器下必须不一样
http.port: 9201
#集群间通信端口号,在同一机器下必须不一样
transport.tcp.port: 9301
#设置集群自动发现机器ip集合
discovery.zen.ping.unicast.hosts: ["127.0.0.1:9301","127.0.0.1:9302","127.0.0.1:9303"]
----------------------------------