在centos7中安装elasticsearch6.3
Posted dhqz
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在centos7中安装elasticsearch6.3相关的知识,希望对你有一定的参考价值。
第一:必须要有jre
elasticsearch是用Java实现的,跑elasticsearch必须要有jre支持,所以必须先安装jre
自己百度安装(1.8)
第二:下载elasticsearch
进入官方下载 https://www.elastic.co/downloads/elasticsearch
因为是centos中运行 所以我们选 tar.gz压缩包;
下载后 用ftp上传到centos里 我们把这个文件上传到 /home/data/下
第三:解压
直接启动
sh /opt/module/elasticsearch-6.3.0/bin/elasticsearch
有报错:
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
at org.elasticsearch.bootstrap.SystemCallFilter.linuxImpl(SystemCallFilter.java:341) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.SystemCallFilter.init(SystemCallFilter.java:616) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.JNANatives.tryInstallSystemCallFilter(JNANatives.java:258) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Natives.tryInstallSystemCallFilter(Natives.java:113) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:109) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:171) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.3.0.jar:6.3.0]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) [elasticsearch-6.3.0.jar:6.3.0]
[2019-07-17T04:33:03,760][INFO ][o.e.n.Node ] [] initializing ...
解决:
在
这个文件最后面加上bootstrap.system_call_filter: false
重新启动!
以上是关于在centos7中安装elasticsearch6.3的主要内容,如果未能解决你的问题,请参考以下文章
在 Docker 的 CentOS7 镜像 中安装 mysql