简体   繁体   English

无法在Windows 7中安装elasticsearch-head

[英]Unable to install elasticsearch-head in Windows 7

Unable to install elasticsearch-head in Windows 7. Getting the following error in command prompt. 无法在Windows 7中安装elasticsearch-head。在命令提示符下获得以下错误。

elasticsearch-2.4.0\bin>plugin install mobz/elasticsearch-head
Installing mobz/elasticsearch-head...
ing https://github.com/mobz/elasticsearch-head/archive/master.zip ...
OR: failed to download out of all possible locations..., use --verbose to get detailed information

How to fix? 怎么修?

[update] [更新]

C:\elasticsearch-2.4.0\bin>plugin.bat install mobz/elasticsearch-head --verbose
-> Installing mobz/elasticsearch-head...
Trying https://github.com/mobz/elasticsearch-head/archive/master.zip ...
Failed: SocketTimeoutException[connect timed out]
ERROR: failed to download out of all possible locations..., use --verbose to get detailed information

For ElasticSearch => 5.0 Running as a plugin of Elasticsearch is now deprecated for security problems. 对于ElasticSearch => 5.0,由于安全性问题,现在不建议以Elasticsearch插件运行。

1 . 1。 Enable CORS in elasticsearch 在elasticsearch中启用CORS

config/elasticsearch.yml: config / elasticsearch.yml:

http.cors.enabled : true http.cors.enabled:是

http.cors.allow-origin : "*" http.cors.allow-origin:“ *”

http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-methods:选项,HEAD,GET,POST,PUT,DELETE

http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length http.cors.allow-headers:X-Requested-With,X-Auth-Token,Content-Type,Content-Length

2. you have to run it in another server, like this for example: 2.您必须在另一台服务器上运行它,例如:

(you will need npm => 6) (您需要npm => 6)

go to: github.com/mobz/elasticsearch-head.git 转到: github.com/mobz/elasticsearch-head.git
donwload it 下载

cd elasticsearch-head cd elasticsearch-head

npm install npm安装

npm run start npm运行开始

open http://localhost:9100/ 打开http:// localhost:9100 /

it worked for me. 它为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM