I. Installation package download
node:https://nodejs.org/en/download/
ES: https://www.elastic.co/downloads/elasticsearch
Head:https://github.com/mobz/elasticsearch-head
Two. Install node
node is installed in order to install the Head plugin, node installation is relatively simple, you need to configure environment variables
Three. Install ES
1. Extract the ES installation package to the specified directory
2. Modify the Elasticsearch.yml under Config
Note: Http.cors.enabled:true and Http.cors.allow-origin must be added to the elasticsearch.yml: "*", otherwise the head is not connected to ES, requesting cross-domain issues
Four. Install the head plugin
1. Unzip the head plugin and place it in the ES directory, before the 5.x version is placed under plugin.
2. Modify _site/app.js
This.prefs = Services. Preferences.instance ();
This.base_uri = This.config.base_uri | | This.prefs.get ("App-base_uri") | | "Http://localhost:9200";
if (This.base_uri.charAt (this.base_uri.length-1)!== "/") {
XHR request fails if the URL is not ending with a "/"
This.base_uri + = "/";
}
3. Modify gruntfile.js
Connect: {
Server: {
Options: {
PORT:9100,
Hostname: ' * ',
Base: '. ',
Keepalive:true
}
}
}
4. Execution of commands
Go to the head root directory
NPM Install
NPM Run Start
Five. Testing
1. First NPM run start head:127.0.0.1:9100
2. Start es:127.0.0.1:9200 in direct run Elasticsearch.bat
I. Windows installation elastic search and head plugin