6

Ubuntu 12.04 を実行している VM があり、ElasticSearch をインストールしようとしています。私は最高の「X を難しい方法で学ぶ」精神でこの要点に従いました。すべてが正常にインストールされます。パッケージはダウンロードされ、解凍され、適切な場所にコピーされます。

問題は、実行時に発生します-次のいずれかを呼び出します。

$ /usr/local/share/elasticsearch/bin/elasticsearch

またはサービスラッパーを使用する ( $ rselasticsearch console)

出力はログに記録されwrapper.log、以下に含まれています。JAVA ホーム / クラスパスに問題があるのではないかと思いますが、よくわかりません。

最も感謝して受け取った助け!

Running ElasticSearch...
wrapper  | Unable to write to the configured log directory: /usr/local/share/elasticsearch/logs (No such file or directory)
wrapper  |   The directory does not exist.
wrapper  | Unable to write to the configured log file: /usr/local/share/elasticsearch/logs/service.log (No such file or directory)
wrapper  |   Falling back to the default file in the current working directory: wrapper.log
wrapper  | --> Wrapper Started as Console
wrapper  | Java Service Wrapper Community Edition 32-bit 3.5.14
wrapper  |   Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
wrapper  |     http://wrapper.tanukisoftware.com
wrapper  | 
wrapper  | Launching a JVM...
jvm 1    | WrapperManager: Initializing...
jvm 1    | WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticSearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticSearchF
jvm 1    | 
jvm 1    | WrapperSimpleApp Usage:
jvm 1    |   java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class{/app_method}} [app_arguments]
jvm 1    | 
jvm 1    | Where:
jvm 1    |   app_class:      The fully qualified class name of the application to run.
jvm 1    |   app_arguments:  The arguments that would normally be passed to the
jvm 1    |                   application.
wrapper  | JVM exited while loading the application.
...
wrapper  | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
wrapper  |   There may be a configuration problem: please check the logs.
wrapper  | <-- Wrapper Stopped

アップデート

現在 2016 年であることを考えると、Ubuntu で ES を実行する最も簡単な方法は Docker を使用することです。docker run elasticsearch最新のものをダウンロードしてフォアグラウンドで実行します。もちろん、デーモンとして実行したり、特定のバージョン (例: elasticsearch:1.7.2) を実行したり、ポートを設定したりできます。

4

5 に答える 5

12

私が以前に行ったことを試している人への警告の言葉 - Gist で指定された URL は、コンパイルされたバージョンではなく、ソース バージョンに対するものであるため、*.class ファイルはありません。

Gist をそのまま使用できますが、現時点で存在する github URL の代わりに、ElasticSearch サイトからの最新のダウンロード URL を置き換えます。

....
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
...

** これは 2014 年 5 月 20 日現在の最新バージョンです。さらに更新されたバージョンを取得するには、このページにアクセスし、TAR リンク ([ダウンロード] セクションの下) を右クリックし、リンクをコピーして、最初の行の wget 引数を置き換えます。

于 2013-01-11T12:53:53.873 に答える
8

私はあなたがしたのと同じ方法でelasticsearchをインストールし、同じ問題に遭遇しました。結局、githubからではなく、コンパイルされたバージョンをインストールすることで問題を修正しました。githubではなくhttp://www.elasticsearch.org/download/2012/12/27/0.20.2.htmlのtarを使用することを除いて、要点と同じ手順を使用する必要があります。https://gist.github.com/4512530で入手できる要点をフォークして更新しました。お役に立てれば。

于 2013-01-11T19:26:34.390 に答える
6

この手順に従って、Elastic Search を簡単に構成します。

ステップ 1 — Java のインストール:

$ sudo apt-get update

$ sudo apt-get install openjdk-7-jre

$ java -バージョン

ステップ 2 — Elasticsearch のダウンロードとインストール:

$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.2.deb

$ sudo dpkg -i elasticsearch-1.7.2.deb

$ sudo update-rc.d エラスティックサーチのデフォルト

ステップ 3 — Elastic の構成:

$ sudo nano /etc/elasticsearch/elasticsearch.yml

node.name: 「私の最初のノード」 cluster.name: mycluster1

$ sudo サービス エラスティックサーチ スタート

ステップ 4 — Elastic の保護 :

$ sudo nano /etc/elasticsearch/elasticsearch.yml

network.bind_host: ローカルホスト

script.disable_dynamic: 真

ステップ 5 — テスト :

$ curl -X GET 'http://localhost:9200' または任意のブラウザーで http://localhost:9200 を実行します。

次の応答が表示されます。

{ 
"status" : 200,
"name" : "Harry Leland",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.2",
"build_hash" : "e43676b1385b8125d647f593f7202acbd816e8ec",
"build_timestamp" : "2015-09-14T09:49:53Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "ご存知、検索用"
}

参照者:

http://laravelcode.com/post/how-to-install-elastic-search-in-local-system-and-live-server

于 2016-03-08T17:36:16.303 に答える
3

Elasticsearch Web サイトで入手可能な deb ファイルをデパッケージすると、うまくいきました。

sudo dpkg -i elasticsearch-1.1.1.deb

于 2014-05-18T07:16:44.190 に答える
0

https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.htmlaptに記載されているようにインストールするとうまくいくようです。

于 2015-11-11T13:29:40.370 に答える