windows elasticsearch-head plug-in installation tutorial

elasticsearch-head Download: https://github.com/mobz/elasticsearch-head

  1.git Download 

  git clone git://github.com/mobz/elasticsearch-head.git

2.安装过node.js和npm的可以跳过这步
  下载node:
https://nodejs.org/dist/
2.1下载完成之后点击安装
2.2安装完成之后 打开cmd新窗口 执行 node -v 和npm -v
2.3配置node
  
并不是说NodeJS和NPM安装好了以后就能直接使用了,这也是新手经常犯的一个错误之一。
因为默认情况下,NPM安装的模块并不会安装到NodeJS的程序目录,
在node目录下创建node_cache和node_global


我们用个示例来看一下,我们先用npm安装一个cluster模块
执行 npm install cluster 会在 node_global\node_modules看到cluster 这样说明对了
2.4执行npm config set prefix "D:\Program Files\nodejs\node_global"npm config set cache "D:\Program Files\nodejs\node_cache"
3.
Installation grunt-cli
npm install -g grunt-cli
4.Elasticsearch-head into the folder, execute the command:
npm install grunt --save
5.Installation package dependent npm
npm install
6.Modify the startup file
after successful installation of all dependencies, modify Gruntfile.js elasticsearch-head in the file directory, an increase in the options hostname attribute set to 0.0.0.0.
connect: {
    server: { options: { hostname: '0.0.0.0', port: 9100, base: '.', keepalive: true } } }

Elasticsearch modify the configuration file config / elasticsearch.yml

Profiles increase in the last two configuration items, such elasticsearch-head plug can access Elasticsearch.

http.cors.enabled: true
http.cors.allow-origin: "*"
At this point if elasticsearch already started state restart.

Start elasticsearch-head 

In elasticsearch-head directory, execute the command:

grunt server

The following output represents a successful start:

Running "connect:server" (connect) task
Waiting forever... Started connect web server on http://localhost:9100
 
 
 
 

Guess you like

Origin www.cnblogs.com/zhaoxueru/p/11469455.html
Recommended