大佬教程收集整理的这篇文章主要介绍了CENTOS安装ElasticSearch,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
https://my.oschina.net/topeagle/blog/591451
如果是用root账号启动,会报以下错误
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:285) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) Refer to the log for complete error details.
这是出于系统安全考虑设置的条件。由于ElasticSearch可以接收用户输入的脚本并且执行,为了系统安全考虑,
建议创建一个单独的用户用来运行ElasticSearchgroupadd elsearch useradd elsearch -g elsearch -p elasticsearch
更改elasticsearch文件夹及内部文件的所属用户及组为elsearch:elsearch
@H_502_51@cd /opt chown -R elsearch:elsearch elasticsearch切换到elsearch用户再启动
@H_502_51@su elsearch cd elasticsearch/bin ./elasticsearch启动后打印信息如下
[2015-12-30 10:15:44,876][WARN ][bootstrap ] unable to install syscall filter: prctl(PR_GET_NO_NEW_PRIVS): Invalid argument [2015-12-30 10:15:45,175][INFO ][node ] [Grim Hunter] version[2.1.1],pid[26383],build[40e2c53/2015-12-15T13:05:55Z] [2015-12-30 10:15:45,176][INFO ][node ] [Grim Hunter] initializing ... [2015-12-30 10:15:45,243][INFO ][plugins ] [Grim Hunter] loaded [],sites [] [2015-12-30 10:15:45,272][INFO ][env ] [Grim Hunter] using [1] data paths,mounts [[/ (/dev/mapper/vg_yong-lv_root)]],net usable_space [33.3gb],net @R_206_10586@l_space [49gb],spins? [no],types [ext4] [2015-12-30 10:15:47,318][INFO ][node ] [Grim Hunter] initialized [2015-12-30 10:15:47,318][INFO ][node ] [Grim Hunter] starTing ... [2015-12-30 10:15:47,388][INFO ][discovery ] [Grim Hunter] elasticsearch/fnXUCLOQQBiC1aR7hhB82Q [2015-12-30 10:15:50,442][INFO ][cluster.service ] [Grim Hunter] new_master {Grim Hunter}{fnXUCLOQQBiC1aR7hhB82Q}{127.0.0.1}{127.0.0.1:9300},reason: zen-disco-join(elected_as_master,[0] joins received) [2015-12-30 10:15:50,491][INFO ][node ] [Grim Hunter] started [2015-12-30 10:15:50,526][INFO ][gateway ] [Grim Hunter] recovered [0] inDices into cluster_state
以上是大佬教程为你收集整理的CENTOS安装ElasticSearch全部内容,希望文章能够帮你解决CENTOS安装ElasticSearch所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。