Windows环境下安装Elasticsearch
2016-04-07 15:23
459 查看
一、下载
官网 https://www.elastic.co/products/elasticsearch/ 下载最近版本选择ZIP格式 链接如下:https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.3.1/elasticsearch-2.3.1.zip
二、配置
1、将下载好的ZIP压缩包解压到指定目录下2、进入 elasticsearch-2.3.1\bin 中打开命令提示符,输入 : elasticsearch
或者 直接运行 elasticsearch.bat文件皆可启动elasticsearch
但这时会报这个错误
D:\elasticsearch-2.3.1\bin>elasticsearch Exception in thread "main" java.lang.RuntimeException: Java version: Oracle Corporation 1.7.0_45 [Java HotSpot(TM) 64-Bit Server VM 24. 45-b08] suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data corruption. Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendatio ns. If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JAVA_OPTS environment variable. Upgrading is preferred, this workaround will result in degraded performance. at org.elasticsearch.bootstrap.JVMCheck.check(JVMCheck.java:123) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:268) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) Refer to the log for complete error details. 请按任意键继续. . .
提示很明显,要不升级jdk到1.8版本,要不在环境变量中添加 JAVA_OPTS属性,这里选后者;
在系统环境变量中添加JAVA_OPTS属性,值为 : -XX:-UseSuperWord
保存退出。
重新打开命令提示符,启动elasticsearch成功。
浏览器地址输入 : http://localhost:9200/ 即可看到如下json字符串
{ "name" : "Roulette", "cluster_name" : "elasticsearch", "version" : { "number" : "2.3.1", "build_hash" : "bd980929010aef404e7cb0843e61d0665269fc39", "build_timestamp" : "2016-04-04T12:25:05Z", "build_snapshot" : false, "lucene_version" : "5.5.0" }, "tagline" : "You Know, for Search" }
三、安装插件
1、安装elasticsearch-head在elasticsearch-2.3.1\bin打开命令提示符,输入:
plugin install mobz/elasticsearch-head
安装成功后,在浏览器中输入:http://localhost:9200/_plugin/head/,可以看到页面。
2、如果不用安装命令,也可以直接下载安装。
https://github.com/mobz/elasticsearch-head 下载安装包。
1).在安装目录elasticsearch-2.3.1中,看是否有plugins目录,如果没有,则创建(第一次时,没有,需要创建)。
2).进入plugins目录,创建head目录
3).进入head目录,创建_site目录
4).解压下载的elasticsearch-head-master.zip,将其elasticsearch-head-master目录下的所有文件放入_site目录中。
5).再次重新启动elasticsearch。在浏览器中输入:http://localhost:9200/_plugin/head/ 查看页面。
相关文章推荐
- 重建二叉树
- Shake动画实现
- Java Map遍历
- ORACLE 11G用于有效期
- css选择器总结
- l2dct
- 如何搭建个人视频点播服务器
- C# 中资源文件的类型
- Java笔试题分类总结--位操作
- LeetCode/reverse(地址A,地址B)的使用和表示的反转范围
- Http,Https (SSL)的Url绝对路径,相对路径解决方案Security Switch 4.2 中文帮助文档
- mysqldump: Got error: 1: Can't create/write to file '/data/export/test.txt' (Errcode: 13)
- 6.7.4 qmgr_message_assign函数:创建QMGR_JOB、QMGR_PEER、QMGR_ENTRY结构体
- android 操作数据库
- [网络技术][转]网卡的offload概念
- 判断临时表是否存在,存在即删除
- [MongoDB] MongoDB增删查改
- 【Java并发编程四】关卡
- 初学python(对比java语言不同) 第三篇
- 多层json解析