訪問http://127.0.0.1:9200/看的的web界面並非很友好,此時我能夠使用elasticsearch-head插件來提供友好的web界面。node
1.登陸github.com搜索elasticsearch-head而後下載:git
wget https://github.com/mobz/elasticsearch-head/archive/master.zip
2.檢查是否安裝了node.js,若是沒有安裝,在官網上如今.pkg文件安裝就能夠了github
npm -install
3.運行elasticsearch-headweb
npm run start
(1)啓動日誌:npm
(2)訪問http://localhost:9100進入web界面:vim
4.在web界面上看到的集羣未鏈接,此時要進行跨越請求配置:cors
cd /Users/shifeifei/Software/elasticsearch-6.2.4/config vim elasticsearch.yml
文件尾部添加:elasticsearch
http.cors.enabled: true http.cors.allow-origin: "*"
重啓elastiasearch服務,刷新http://localhost:9100頁面spa