博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Elasticsearch安装配置
阅读量:7022 次
发布时间:2019-06-28

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

1. 从下载最新版本的Elasticsearch,目前最新版本为V2.3.3。

2. 解压

tar zxvf elasticsearch-2.3.2.tar.gz

3. 切换到Elasticsearch的bin目录下,启动服务。 

./elasticsearchException in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.

启动时会发现Elasticsearch会报如下错误,因为Elasticsearch为安全起见不允许使用root账号启动服务。

4. 创建一个新账号

[root@Server01 bin]# useradd elasticsearchuser[root@Server01 bin]# passwd elasticsearchuserChanging password for user elasticsearchuser.New password: BAD PASSWORD: is too simpleRetype new password: passwd: all authentication tokens updated successfully.[root@Server01 bin]# usermod -g root elasticsearchuser

5. 重新启动服务。

[elasticsearchuser@Server01 bin]$ ./elasticsearch[2016-05-19 16:44:41,864][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in[2016-05-19 16:44:42,190][INFO ][node                     ] [Genis-Vell] version[2.3.2], pid[8878], build[b9e4a6a/2016-04-21T16:03:47Z][2016-05-19 16:44:42,191][INFO ][node                     ] [Genis-Vell] initializing ...[2016-05-19 16:44:42,774][INFO ][plugins                  ] [Genis-Vell] modules [lang-groovy, reindex, lang-expression], plugins [], sites [][2016-05-19 16:44:42,805][INFO ][env                      ] [Genis-Vell] using [1] data paths, mounts [[/ (/dev/sda2)]], net usable_space [486.6gb], net total_space [533.7gb], spins? [possibly], types [ext4][2016-05-19 16:44:42,805][INFO ][env                      ] [Genis-Vell] heap size [990.7mb], compressed ordinary object pointers [true][2016-05-19 16:44:42,805][WARN ][env                      ] [Genis-Vell] max file descriptors [20480] for elasticsearch process likely too low, consider increasing to at least [65536][2016-05-19 16:44:44,758][INFO ][node                     ] [Genis-Vell] initialized[2016-05-19 16:44:44,758][INFO ][node                     ] [Genis-Vell] starting ...[2016-05-19 16:44:44,858][INFO ][transport                ] [Genis-Vell] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}[2016-05-19 16:44:44,863][INFO ][discovery                ] [Genis-Vell] elasticsearch/kpitDjQNTwu8Q4D4pbWXnQ[2016-05-19 16:44:47,910][INFO ][cluster.service          ] [Genis-Vell] new_master {Genis-Vell}{kpitDjQNTwu8Q4D4pbWXnQ}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)[2016-05-19 16:44:47,923][INFO ][http                     ] [Genis-Vell] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}[2016-05-19 16:44:47,923][INFO ][node                     ] [Genis-Vell] started[2016-05-19 16:44:48,020][INFO ][gateway                  ] [Genis-Vell] recovered [0] indices into cluster_state

6. 服务也可以以守护进程方式运行

./elasticsearch -d

还可以在启动时同时指定pid 

./elasticsearch -d -p pid

7. 在浏览器中访问一下,再次确认服务是完好的,但前提是修改/config/elasticsearch.yml,找到 network.host在下面添加一行,然后就可以在浏览器中访问。

 network.host : 10.0.0.5

浏览器显示内容如下:

{  "name" : "Gargouille",  "cluster_name" : "elasticsearch",  "version" : {    "number" : "2.3.2",    "build_hash" : "b9e4a6acad4008027e4038f6abed7f7dba346f94",    "build_timestamp" : "2016-04-21T16:03:47Z",    "build_snapshot" : false,    "lucene_version" : "5.5.0"  },  "tagline" : "You Know, for Search"}

 至此,Elasticsearch安装启动完毕,更详细的操作还待后文。

转载地址:http://ufbxl.baihongyu.com/

你可能感兴趣的文章
Android MVVM探索(一) - DataBiding初解
查看>>
最简单三星手机怎么没ROOT激活Xposed框架
查看>>
社会风气欠佳,很多技术们都想着一夜暴富
查看>>
Electron版掘金轻客户端
查看>>
java se 8 学习(二、stream API)
查看>>
现代移动端网络短连接的优化手段总结:请求速度、弱网适应、安全保障
查看>>
3.SpringBoot整合RabbitMQ之发送接收消息实战
查看>>
dva开发一个cnode网站(3)
查看>>
自定义View合辑(6)-波浪(贝塞尔曲线)
查看>>
礼贺新年|宝瓷林·玉堂春·酒具
查看>>
spring cloud微服务主要组件作用和架构介绍
查看>>
(四十四)java版spring cloud+spring boot+redis多租户社交电子商务平台-security简单使用...
查看>>
(二十二)java版spring cloud+spring boot+redis多租户社交电子商务平台-Ribbon设计原理...
查看>>
原生骨架屏 - 2.0.0重磅推出
查看>>
Toolfk.com 程序员工具网上线
查看>>
《Dark Reader》为任意网站启用夜间模式
查看>>
JavaScript数据类型详解
查看>>
微服务架构实战篇(二):Spring boot2.0 + Swagger2 让你的API可视化
查看>>
网络 tcp 和 udp
查看>>
正则表达式
查看>>