环境要求 jdk1.8 安装node.js 下载地址:https://nodejs.org/en/download/
elasticsearch下载地址:
下载完成后解压
访问地址:http://localhost:9200/ (默认端口9200)出现下面截图说明启动成功
elasticsearch-head-maste下载地址 https://github.com/mobz/elasticsearch-head
将下载后的文件解压后,切换到elasticsearch-head-maste这个目录,使用 npm install 进行安装 ,安装完成后使用
npm run start 进行启动(最好完成下面的配置再进行启动)
进入elasticsearch 安装目录下的config目录,修改elasticsearch.yml文件.在文件的末尾加入以下代码
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
然后去掉network.host: 192.168.0.1的注释并改为network.host: 0.0.0.0,去掉cluster.name;node.name;http.port的注释(也就是去掉#)
②双击elasticsearch.bat重启es(这个在elasticsearch的bin目录下)
在下图的文件末尾添加 hostname:'*',
修改以上位置,在elasticsearch和elasticsearch-head-maste都启动的情况下,访问 http://localhost:9100/ 出现下面的结果说明配置成功
、