我下载了弹性搜索,并在Windows笔记本电脑上运行了elasticsearch.bat,但是一旦尝试: 卷曲http://localhost:9200 我得到:
C:\Temp\elasticsearch-6.4.0\bin>curl http://localhost:9200/
'curl' is not recognized as an internal or external command,
operable program or batch file.
我想念什么?我正在按照以下说明进行安装: https://www.elastic.co/downloads/elasticsearch
此外,“ Invok _restMethod”在电源外壳上也会显示错误:
PS C:\Temp\elasticsearch-6.4.0\bin> Invoke-RestMethod http://localhost:9200
**The term 'Invoke-RestMethod' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.**
At line:1 char:18
+ Invoke-RestMethod <<<< http://localhost:9200
+ CategoryInfo : ObjectNotFound: (Invoke-RestMethod:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
答案 0 :(得分:1)
curl是单独运行的exe,您可以从以下链接下载它 https://curl.haxx.se/download.html
或
您可以在命令提示符下使用以下命令运行elasticsearch
bin \ elasticsearch.bat
或
您可以使用以下命令将弹性搜索作为服务安装
elasticsearch-service.bat安装
ref
https://efficientuser.com/2016/11/01/installing-elasticsearch-5-0-as-service-on-windows/
答案 1 :(得分:0)
您在Windows上,因此如文档所述,请使用powershell并运行以下命令:
Invoke-RestMethod http://localhost:9200