ElasticSearch系列(一):介绍、安装(Docker、Windows、Linux)

1.介绍

Elasticsearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。Elasticsearch是用Java语言开发的,并作为Apache许可条款下的开放源码发布,是一种流行的企业级搜索引擎。Elasticsearch用于云计算中,能够达到实时搜索,稳定,可靠,快速,安装使用方便。官方客户端在Java、.NET(C#)、PHP、Python、Apache Groovy、Ruby和许多其他语言中都是可用的。根据DB-Engines的排名显示,Elasticsearch是最受欢迎的企业搜索引擎,其次是Apache Solr,也是基于Lucene。

2.安装

Docker安装ElasticSearch

下载镜像

执行命令:docker pull elasticsearch:7.7.0

运行镜像

执行命令:docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.7.0

Windows安装ElasticSearch

下载安装包

地址:https://www.elastic.co/cn/downloads/elasticsearch

创建Keystore

执行命令:elasticsearch-keystore create

运行ElasticSearch

切换到bin目录 执行命令:elasticsearch

设置密码

执行命令:elasticsearch-setup-passwords interactive

配置文件信息修改

切换到 config/elasticsearch.yml

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
cluster.name: robin-elasticsearch
node.name: robin-node
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
cluster.initial_master_nodes: ["robin-node"]
原文地址:https://www.cnblogs.com/vic-tory/p/13054378.html