Windows 10 安装ElasticSearch(2)- MSI安装ElasticSearch和安装Kibana

翻阅上篇文章:Windows 10 安装 ElasticSearch
上次写的是下载Zip包安装的,在下载页面 发现有 MSI (BETA) 的下载可选项。了解以后发现MSI安装也值得尝试。html

MSI安装ElasticSearch

参考文章:Install Elasticsearch with Windows MSI Installer
与zip包安装相比,MSI安装能够将ElasticSearch做为Windows 服务安装,这样能够方便设置开机自启动,就不用看到有一个cmd命令行在任务栏,ElasticSearch服务在后台运行。
固然,使用MSI安装的最大便利是,有GUI引导方便安装。
安装完成以后,手动启动ElasticSearch服务,若是按照默认配置安装,验证是否安装成功的地址仍然是http://127.0.0.1:9200/json

命令行安装ElasticSearch

官方文档介绍了除GUI安装的方式,使用命令行安装ElasticSearch。windows

msiexec.exe / i elasticsearch-6.6.1.msi / qn

更多了解如何使用msiexec,出了能够使用msiexec.exe / help 查看,也能够查阅微软官方技术文档:https://docs.microsoft.com/zh-cn/windows/desktop/Msi/command-line-optionsbash

卸载ElasticSearch

不能使用MSI进行卸载,卸载的话,只能经过 “添加/删除程序” 进行卸载。app

安装Kibana

参考:https://www.elastic.co/guide/cn/kibana/current/windows.html
下载: https://www.elastic.co/downloads/kibanacurl

加载示例数据

参考 :https://www.elastic.co/guide/cn/kibana/current/tutorial-load-dataset.htmlelasticsearch

下载示例数据以后,有两个地方须要多说两句。
提醒1:ide

使用如下命令在终端(如 bash )创建一个莎士比亚数据集的映射:ui

能够打开kibana界面,在Dev Tools的Console下使用PUT建立索引。
或者使用Windows 10 自带Curl命令,进行操做。
若是没有自带curl,能够安装curl,下载页面:https://curl.haxx.se/download.html
curl的使用请自行搜索。url

提醒2:官方文档中给出的命令须要作个修正

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json

例如上述语句是没法在cmd下执行成功,须要修正,即修改单引号为双引号

curl -H "Content-Type: application/x-ndjson" -XPOST "localhost:9200/bank/account/_bulk?pretty" --data-binary @accounts.json
相关文章
相关标签/搜索