ElasticSearch5.5.2:Windows下ElasticSearch安装配置
环境
1、Windows10企业版X64
2、JDK-1.8
3、ElasticSearch-5.5.2
4、elasticsearch-head插件
5、node-v6.11.2-x64.msi
1、下载软件
首先默认机器已经安装了java环境,JDK-1.8等。
1.1 、下载ElasticSearch
从官方下载中心 ElasticSearch Download 下载ElasticSearch安装包,ES的最新版本是5.5.2

开启ElasticSearch 服务
将zip文件解压到elasticsearch-5.5.2,进入 D:\work\ElasticSearch\elasticsearch-5.5.2\bin 目录,双击执行 elasticsearch.bat,该脚本文件执行 ElasticSearch 安装程序,稍等片刻,打开浏览器,输入 http://localhost:9200 ,
显式以下画面,说明ES安装成功。

1.2、下载下载elasticsearch-head
下载路径:https://github.com/mobz/elasticsearch-head

下载解压后,转到elasticsearch-head解压路径D:\work\ElasticSearch\elasticsearch-head-master,打开命令框,把把head插件的源码git clone下来:git clone git://github.com/mobz/elasticsearch-head.git


1.3、Node.js下载安装


安装后,检查是否安装成功

安装成功
2、安装grunt
grunt是一个很方便的构建工具,可以进行打包压缩、测试、执行等等的工作,5.0里的head插件就是通过grunt启动的。因此需要安装grunt:
注意:路径切到nodejs安装路径下。
打开命令框,输入:npm install -g grunt-cli
-g代表全局安装。安装路径为C:\Users\xxx\AppData\Roaming\npm,并且自动加入PATH变量。安装完成后检查一下:

3、修改head源码
目录:elasticsearch-head/Gruntfile.js:


增加hostname属性,设置为*
4、修改连接地址
目录:elasticsearch-head\_site/app.js

修改head的连接地址:
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
把localhost修改成你es的服务器地址,如:
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.10.10:9200";
5、启动elasticsearch.bat

效果图如下:

6、执行npm install 下载的包
在elasticsearch-head目录中,执行:npm install ,记住输入命令后然后回车



7、最后,在head源代码目录下启动nodejs:
grunt server

8、访问:target:9100
这个时候,访问http://localhost:9100就可以访问head插件了:

集群未连接:解决方案
修改elasticsearch.yml文件
# 增加如下字段
http.cors.enabled: true http.cors.allow-origin: "*"保存后重启启动elasticsearch.bat和head,然后访问在浏览器访问http://localhost:9100/,集群还是未连接
重新修改elasticsearch.yml文件,打开如下,里面所有配置都是注释,把必要的配置取消注释,并修改成自己实际的参数
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#换个集群的名字,免得跟别人的集群混在一起
cluster.name: ictr_ElasticSearch
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#换个节点名字
node.name: ictr_node1
node.master: true
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
path.data: /data/elasticsearch
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#修改一下ES的监听地址,这样别的机器也可以访问
network.host: 127.0.0.1
#
# Set a custom port for HTTP:
#
#默认的就好
http.port:
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
# discovery.zen.ping.unicast.hosts: ["127.0.0.1", "[::1]"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / + ):
#
#discovery.zen.minimum_master_nodes:
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes:
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true http.cors.enabled: true
http.cors.allow-origin: "*" action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.graph.enabled: false
xpack.watcher.enabled: false
xpack.ml.enabled: false #xpack.security.audit.enabled: true
#http.cors.allow-headers: Authorization
#action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*
#action.auto_create_index: *
#vm.max_map_count=
保存后重启启动elasticsearch.bat和head,然后访问在浏览器访问http://localhost:9100/ 集群连接成功

* RED(红): 代表具体的分片还没有在集群中分配好;
* YELLOW(黄): 代表主分片已经分配好,但是副本尚未分配;
* GREEN(绿):表示所有的分片都已分配好,群集正常运行;
如果在局域网中无法访问,需要修改 elasticsearch.yml配置文件,
增加“network.host: 0.0.0.0”。
9、将ElasticSearch 安装成Windows服务(Service)
转到ElasticSearch的bin目录打开命令框,输入:elasticsearch-service.bat install

打开服务界面:

启动服务,失败,查看目录下D:\work\ElasticSearch\elasticsearch-5.5.2\logs日志
错误信息如下:
[2017-09-02 13:52:13] [error] [14192] Failed creating java %JAVA_HOME%\jre\bin\server\jvm.dll
[2017-09-02 13:52:13] [error] [14192] 系统找不到指定的路径。
解决办法:
修改环境变量,把 JAVA_HOME 的环境变量由用户变量的位置移动到系统变量里面

重启elasticsearch-service服务,启动成功

ElasticSearch5.5.2:Windows下ElasticSearch安装配置的更多相关文章
- Windows 下如何安装配置Snort视频教程
Windows 下如何安装配置Snort视频教程: 第一步: http://www.tudou.com/programs/view/UUbIQCng360/ 第二部: http://www.tudou ...
- [转载]Apache在windows下的安装配置
Apache在windows下的安装配置 转载自:http://blog.sina.com.cn/s/blog_536f16b00100cfat.html 1 Apache的下载 Apache ...
- Windows下Redis安装配置和使用注意事项
Windows下Redis安装配置和使用注意事项 一:下载 下载地址: https://github.com/microsoftarchive/redis/releases 文件介绍: 本文以3.2. ...
- windows下elasticsearch安装ik分词器后无法启动
windows下elasticsearch安装ik分词器后启动报如下图错误: 然后百度说是elasticsearch路径有空格,一看果然我的路径有空格,然后重新换个路径就好了.
- < python音频库:Windows下pydub安装配置、过程出现的问题及常用API >
< python音频库:Windows下pydub安装配置.过程出现的问题及常用API > 背景 刚从B站上看过倒放挑战之后也想体验下,心血来潮一个晚上完成了基本的实现.其中倒放与播放部分 ...
- windows下如何安装配置mysql-5.7-m14-winx64(zip格式的安装)
win7 64位下如何安装配置mysql-5.7.4-m14-winx64 1. mysql-5.7.4-m14-winx64.zip下载 官方网站下载地址:http://dev.mysql.co ...
- Windows下CVSNT安装配置
首先要说明:X64下安装此软件会报 “cvs [login aborted]: WIN-4H9CRJO1TRA\Administrator: Switch to user failed due to ...
- centos7下elasticSearch安装配置
OS:Centos7x虚拟机 1H2Gjdk:1.8elasticsearch:5.6.0 1.下载“elasticsearch-5.6.0.tar.gz”解压到/usr/local/elastics ...
- Hadoop在Windows下的安装配置
由于本人近期近期一段时间 都在学习Hadoop,接触了比較多的理论,可是想要深入的去学习Hadoop整个平台,那就必须实战的训练,首先第一步,当然是先搭建好一个Hadoop平台为先.可是比較坑爹的是. ...
随机推荐
- [CF949C]Data Center Maintenance
题目大意:$n$个点,每个点有一个值$w_i$.$m$个条件,每个条件给出$x,y$,要求$w_x\not =w_y$.选择最少的点,使其值加$1$后,所有条件成立(数据保证有解). 题解:对于每个条 ...
- 51NOD 1554 欧姆诺姆和项链 巧妙利用KMP
请戳这里! #include<cstdio> #define N 1000100 char s[N]; int n,k,nxt[N],ans[N]; int main() { scanf( ...
- idiots
idiots 题目描述 给定 $n$ 个长度分别为 $a_i$ 的木棒,问随机选择 $3$ 个木棒能够拼成三角形的概率. 输入格式 第一行一个正整数 nn. 第二行 nn 个正整数,第 ii 个数表示 ...
- mysql外网链接
1:设置mysql的配置文件 /etc/mysql/my.cnf 找到 bind-address =127.0.0.1 将其注释掉://作用是使得不再只允许本地访问: 重启mys ...
- c#网络编程-第一章
1.需求 获得网页数据,并填充到webbrowser空间中 2.代码示例 private void button1_Click_1(object sender, EventArgs e) { //1. ...
- 洛谷P1522 牛的旅行
题目描述 农民 John的农场里有很多牧区.有的路径连接一些特定的牧区.一片所有连通的牧区称为一个牧场.但是就目前而言,你能看到至少有两个牧区通过任何路径都不连通.这样,Farmer John就有多个 ...
- 【IDEA】IDEA创建Maven的Web项目并运行以及打包
0.IDEA集成Maven并设置Maven的配置 idea15之后的版本,都自带了maven插件,idea14貌似需要自己安装,方法也很简单:File->Settings->Plugin ...
- Linux内存管理之页面回收【转】
转自:http://blog.csdn.net/bullbat/article/details/7311205 请求调页机制,只要用户态进程继续执行,他们就能获得页框,然而,请求调页没有办法强制进程释 ...
- java应用挂死故障排查
现象: java开发的web应用无法访问 排查: 1.从resin/log/watchdog-manager.log的日志里可以看出来,jvm的内存满,无法创建新进程 java.lang.OutOfM ...
- C++ 采集音频流(PCM裸流)实现录音功能
与上一篇的“C++ 播放音频流(PCM裸流)” 点击打开链接 相对应,本篇是关于用C++实现录音功能的.同样是直接建一个win32控制台程序然后将代码拷过去改个文件名就可以用,也可以下载本人上传的相关 ...