Why use elasticsearch-head
The elasticsearch service returns a json interface, which does not seem very intuitive, and the head can provide a friendly interface, at the same time can also view basic information, rest request simulation and basic data retrieval
Download, search for elasticsearch-head on github, find the download link, and download
wget https://github.com/mobz/elasticsearch-head/archive/master.zip
Unzip,
uzip master.zip
Enter the downloaded directory and download dependent environment
cd elasticsearch-head-master/
npm install
Start the service,
npm run start
View, visit http: // localhost: 9100 /
The cluster health: not connected appears above because the elasticsearch and head plug-ins are two separate processes. The access between them is cross-domain, and the elasticsearch configuration needs to be modified.
vim config/elasticsearch.yml
Add the following content at the end of the file:
http.cors.enabled: true
http.cors.allow-origin: "*"
Restart es in the background
sh ./bin/elasticsearch -d
Restart the head plugin, and visit the browser, the following content appears