在linux环境下启动es,linux上Elasticsearch 安装配置、网页访问

一、ElasticSearch简述

ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。Elasticsearch是用Java开发的,并作为Apache许可条款下的开放源码发布,是当前流行的企业级搜索引擎。设计用于云计算中,能够达到实时搜索,稳定,可靠,快速,安装使用方便。我们建立一个网站或应用程序,并要添加搜索功能,但是想要完成搜索工作的创建是非常困难的。我们希望搜索解决方案要运行速度快,我们希望能有一个零配置和一个完全免费的搜索模式,我们希望能够简单地使用JSON通过HTTP来索引数据,我们希望我们的搜索服务器始终可用,我们希望能够从一台开始并扩展到数百台,我们要实时搜索,我们要简单的多租户,我们希望建立一个云的解决方案。因此我们利用Elasticsearch来解决所有这些问题以及可能出现的更多其它问题。

二、今天折腾了一天终于搞定了ElasticSearch在linux上的安装,结果我在安装ElasticSearch的时候遇到了下面的一系列问题,现在写下来让自己记住,经常翻看,希望也能帮到你们。

1.运行环境:

redhat6.5 elasticsearch-2.4.0 jdk1.8.31(我虚拟机的jdk版本)

1.把在官网下载的elasticsearch-2.4.0.tar.gz的安装包,我把解压后得到的elasticsearch-2.4.0放了/opt/elasticsearch下。

2.然后我就使用命令启动elasticsearch:

报错:[root@localhost bin]# ./elasticsearch [2017-07-09  11:52:59,903][WARN ][bootstrap ] jvm uses the client vm, make sure to run java with the server vm for best performance by adding -server to the command line Exception in thread “main” java.lang.RuntimeException: Java version: Oracle Corporation 1.7.0_51 [Java HotSpot(TM) Client VM 24.51-b03] 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 recommendations. 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.

大意是: 1.7.0_51遭受来自这个网站https://bugs.openjdk.java.net/browse/JDK-8024830的***,它会使数据丢失,需要升级JVM或者添加 -XX:-UseSuperWord to the JAVA_OPTS environment variable.我升级JDK到1.8.31版本。重新启动,结果又报新的错误,

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) Re

你可能感兴趣的:(在linux环境下启动es)