Elasticsearch---(1)Windows安装Elasticsearch

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq1021979964/article/details/88419865

ElasticSearch

什么是 ElasticSearch?

基于Apache Lucene构建的开源搜索引擎
采用java编写,提供简单易用的RESTFulAPI
轻松的横向扩展,可支持PB级的结构化或非结构化数据处理

ElasticSearch官网下载地址: www.elastic.co

一:Windows安装ElasticSearch

1.进入官方网址下载ElasticSearch

2.选择版本下载,我下载的是6.6.1版本的

3.解压到自己选择的目录下

4.到elasticsearch-6.6.1\bin目录下双击启动

5.打开localhost:9200查看是否已启动

6.为了之后启动方便,我将启动的方式设置为服务

打开CMD命令行界面,来到Elasticsearch的bin目录下

执行 elasticsearch-service.bat install

打开服务可以看到

可以双击启动服务也可以在CMD命令行上启动

7.安装Elasticsearch-head插件之前需要先安装node.js和grunt

因为head依赖node.js和grunt,所以需要先安装这两个

node.js 因为之前我就已经安装了就不演示了

提供下载地址: http://nodejs.cn/download/

安装完了之后,查看node的版本,我的是10.14.1版本

在node的目录下安装grunt

8.安装Elasticsearch-head插件,并解压

github的head下载地址: https://github.com/mobz/elasticsearch-head

9.安装Elasticsearch-head

CMD命令行界面下来到head的目录执行npm install安装命令

10.修改配置

在elasticsearch.yml配置文件上添加:

http.cors.enabled: true 
http.cors.allow-origin: "*"
node.master: true
node.data: true

并解开几个配置项的注释

network.host: 0.0.0.0
http.port: 9200
node.name: node-1
cluster.name: my-application

在elasticsearch-head目录找到Gruntfile.js文件

在connect的server的options添加hostname:'*',

11.重启elasticsearch服务和启动elasticsearch-head

重启elasticsearch服务

启动elasticsearch-head

12.访问localhost:9200和localhost:9100

Windows下安装elasticsearch成功

猜你喜欢

转载自blog.csdn.net/qq1021979964/article/details/88419865