博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
elasticsearch 安装记录
阅读量:4985 次
发布时间:2019-06-12

本文共 4070 字,大约阅读时间需要 13 分钟。

  windows下的安装即开箱即用,到bin目录下打开elasticsearch.bat,访问localhost:9200,页面显示:

{  "name" : "Windshear",  "cluster_name" : "elasticsearch",  "version" : {    "number" : "2.3.5",    "build_hash" : "90f439ff60a3c0f497f91663701e64ccd01edbb4",    "build_timestamp" : "2016-07-27T10:36:52Z",    "build_snapshot" : false,    "lucene_version" : "5.5.0"  },  "tagline" : "You Know, for Search"}

发送post请求,将需要添加的信息放到body中:

http://localhost:9200/myindex/share/1body:{  "url": "www.baidu.com",  "place": "Beijing",  "company": "Baidu"}

而后用get请求获取到该消息:

http://localhost:9200/myindex/share/1respond:{    "_index": "myindex",    "_type": "share",    "_id": "1",    "_version": 4,    "found": true,    "_source": {        "url": "www.baidu.com",        "place": "Beijing",        "company": "Baidu"    }}

============================>

linux环境下的安装遇到了几个问题:

首先解压文件:

tar -zxvf elasticsearch-2.3.5.tar.gz

进入目录elasticsearch-2.3.5

./bin/elasticsearch

但是会报错:

Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)Refer to the log for complete error details.

于是,将解压的整个目录更换用户组与用户:

chown -R ccj:ccj elasticsearch-2.3.5

然后切换到该用户:

su - ccj

再开启elasticsearch

[ccj@www elasticsearch-2.3.5]$ ./elasticsearch[2016-08-22 02:11:31,007][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in[2016-08-22 02:11:46,518][INFO ][node                     ] [Morpheus] version[2.3.5], pid[4098], build[90f439f/2016-07-27T10:36:52Z][2016-08-22 02:11:46,539][INFO ][node                     ] [Morpheus] initializing ...[2016-08-22 02:12:20,330][INFO ][plugins                  ] [Morpheus] modules [lang-groovy, reindex, lang-expression], plugins [], sites [][2016-08-22 02:12:27,770][INFO ][env                      ] [Morpheus] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [14.3gb], net total_space [18.2gb], spins? [possibly], types [ext3][2016-08-22 02:12:27,910][INFO ][env                      ] [Morpheus] heap size [1007.3mb], compressed ordinary object pointers [true][2016-08-22 02:12:27,992][WARN ][env                      ] [Morpheus] max file descriptors [1024] for elasticsearch process likely too low, consider increasing to at least [65536][2016-08-22 02:16:50,949][INFO ][node                     ] [Morpheus] initialized[2016-08-22 02:16:51,108][INFO ][node                     ] [Morpheus] starting ...[2016-08-22 02:21:06,356][WARN ][monitor.jvm              ] [Morpheus] [gc][young][3][2] duration [3.8m], collections [1]/[3.9m], total [3.8m]/[4.5m], memory [137.5mb]->[31.4mb]/[1007.3mb], all_pools {[young] [127.7mb]->[7.2mb]/[133.1mb]}{[survivor] [9.7mb]->[16.6mb]/[16.6mb]}{[old] [0b]->[10.1mb]/[857.6mb]}[2016-08-22 02:21:55,549][INFO ][transport                ] [Morpheus] publish_address {
127.0.0.1:9300}, bound_addresses {
127.0.0.1:9300}, {[::1]:9300}[2016-08-22 02:22:05,241][INFO ][discovery ] [Morpheus] elasticsearch/iJG2imH8QrqHjcgqWq0Q1g[2016-08-22 02:22:44,783][WARN ][discovery ] [Morpheus] waited for 30s and no initial state was set by the discovery[2016-08-22 02:23:03,300][INFO ][http ] [Morpheus] publish_address {
127.0.0.1:9200}, bound_addresses {
127.0.0.1:9200}, {[::1]:9200}[2016-08-22 02:23:05,361][INFO ][node ] [Morpheus] started[2016-08-22 02:23:11,602][INFO ][cluster.service ] [Morpheus] new_master {Morpheus}{iJG2imH8QrqHjcgqWq0Q1g}{
127.0.0.1}{
127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)[2016-08-22 02:23:17,903][INFO ][gateway ] [Morpheus] recovered [0] indices into cluster_state

 

转载于:https://www.cnblogs.com/bruceChan0018/p/5825811.html

你可能感兴趣的文章
通过.frm表结构和.ibd文件恢复数据
查看>>
R语言之——字符串处理函数
查看>>
架构师速成5.1-小学gtd进阶
查看>>
Spring-aop(一)
查看>>
ucos在xp平台下开发环境搭建
查看>>
python基础入门while循环 格式化 编码初识
查看>>
cmake方式使用vlfeat
查看>>
windows下用纯C实现一个简陋的imshow:基于GDI
查看>>
struts2 自定义类型转换器
查看>>
cocos2d-x xna在有vs2012和vs2010的情况下的环境部署
查看>>
43-安装 Docker Machine
查看>>
c++学习(三):表达式和语句
查看>>
laravel框架基础知识总结
查看>>
nginx: 响应体太大
查看>>
字符串反混淆实战 Dotfuscator 4.9 字符串加密技术应对策略
查看>>
单例模式
查看>>
Robotium源码分析之Instrumentation进阶
查看>>
Android 交错 GridView
查看>>
(2)把BlackBerry作为插件安装到已有的Eclipse中
查看>>
VUE-es6
查看>>