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平台为先.可是比較坑爹的是. ...
随机推荐
- [HNOI2015][bzoj4011] 落叶枫音 [拓扑DP]
题面 传送门 思路 首先有一个结论(应该是有比较大的利用价值的): 有向无环图的生成外向树树个数等于所有入度非0的点的入度乘积 然后这道题里面,唯一不合拍的因素就是这里有一条可能成环的边 我们可以把这 ...
- [bzoj] 3263 陌上花开 洛谷 P3810 三维偏序|| CDQ分治 && CDQ分治讲解
原题 定义一个点比另一个点大为当且仅当这个点的三个值分别大于等于另一个点的三个值.每比一个点大就为加一等级,求每个等级的点的数量. 显然的三维偏序问题,CDQ的板子题. CDQ分治: CDQ分治是一种 ...
- 用CSS模拟魔兽世界技能冷却的效果
效果演示 上面的效果看起来还不错吧.在网页里,除了用Flash,我们还是有不少方法可以实现它. 显然这种效果不复杂,一张背景图片,加上前面带有透明度的多边形图层,在脚本控制下就可以转起来了.但问题 ...
- hibernate中类状态转换
- Hibernate 中 get()和load()的区别
一.1.程序检索数据库中不存在的OID: load方式检索不到的话会抛出org.hibernate.ObjectNotFoundException异常 get方法检索不到的话会返回nu ...
- C语言fopen函数了解
fopen()函数功能:open a file. 原型:FILE * fopen(const char * path,const char * mode); 需要#include<stdio.h ...
- Sqlite插入、修改、删除表里面的数据
转载 2014年05月10日 10:38:21 标签: sqlite3 / 数据库 8688 转自:http://www.cnblogs.com/myqiao/archive/2011/07/13/2 ...
- css3实现图片划过一束光闪过效果
该效果在京东里的图片有. .img { display:block; position: relative; width:800px; height:450px; margin:0 auto; } . ...
- 检查URL Protocol是否安装的项目
https://github.com/ismailhabib/custom-protocol-detection
- war导出问题myeclpise
内附破解文件以及myeclipse10.7.1导出war问题解决办法一.原作者的PJ程序在myeclipse10.7.1环境下测试通过(win7 x64) 按照步骤操作就可以完成PJ过程.PJ前先将c ...