elasticsearch安装

1.安装elasticsearch(windows下)

https://www.elastic.co/downloads/elasticsearch中点击下载,根据自己的操作系统来选择。elasticsearch安装

下载完后解压,到elasticsearch-6.2.2\bin执行elasticsearch.bat文件。观察localhost:9200是否正常显示elasticsearch安装

2.安装head插件.

 

1.先安装node.js。https://nodejs.org/en/。建议安装好之后配置到环境变量之中

2.安装grunt

npm install -g grunt-cli

3.下载head插件。https://github.com/mobz/elasticsearch-head 压缩包的形式下载。当然也可以clone下来,都一样的。解压。

4.修改elasticsearch-6.2.2\config中的elasticsearch.yml文件

cluster.name: my-application

node.name: node-1

network.host: 0.0.0.0

http.port: 9200

http.cors.enabled: true
http.cors.allow-origin: "*"

 

5.在head解压的目录下,执行

npm install

执行完之后执行

grunt server

elasticsearch安装

最后通过localhost:9100查看elasticsearch安装

备注:elasticsearch-head-master\_site中的app.js中的this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";修改head对应的elasticsearch的uri。要对应,要对应,要对应。在elasticsearch-head-master中的Gruntfile.js中的port: 9100可以修改port更改head进入的界面。

 

 

转载于:https://my.oschina.net/u/3159571/blog/1647585