"

亚博电子拥有全球最顶尖的原生APP,每天为您提供千场精彩体育赛事,亚博电子更有真人、彩票、电子老虎机、真人电子竞技游戏等多种娱乐方式选择,亚博电子让您尽享娱乐、赛事投注等,且无后顾之忧!

"
首頁 > Install Elasticsearch with .zip or .tar.gz | Elasticsearch Reference [6.5] | Elastic

Install Elasticsearch with .zip or .tar.gz | Elasticsearch Reference [6.5] | Elastic

互聯網 2021-02-26 19:37:23
Install Elasticsearch with .zip or .tar.gzedit

Elasticsearch is provided as a .zip and as a .tar.gz package.Thesepackages can be used to install Elasticsearch on any system and are theeasiest package format to use when trying out Elasticsearch.

This package is free to use under the Elastic license. It contains open sourceand free commercial features and access to paid commercial features.Start a 30-day trial to try out all of thepaid commercial features. See theSubscriptions page for information aboutElastic license levels.

The latest stable version of Elasticsearch can be found on theDownload Elasticsearch page.Other versions can be found on thePast Releases page.

Elasticsearch requires Java 8 or later. Use theofficial Oracle distributionor an open-source distribution such as OpenJDK.

Download and install the .zip packageedit

The .zip archive for Elasticsearch v6.5.4 can be downloaded and installed as follows:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.zipwget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.zip.sha512shasum -a 512 -c elasticsearch-6.5.4.zip.sha512 unzip elasticsearch-6.5.4.zipcd elasticsearch-6.5.4/

Compares the SHA of the downloaded .zip archive and the published checksum, which should outputelasticsearch-{version}.zip: OK.

This directory is known as $ES_HOME.

Alternatively, you can download the following package, which contains onlyfeatures that are available under the Apache 2.0 license:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-6.5.4.zip

Download and install the .tar.gz packageedit

The .tar.gz archive for Elasticsearch v6.5.4 can be downloaded and installed as follows:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gzwget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz.sha512shasum -a 512 -c elasticsearch-6.5.4.tar.gz.sha512 tar -xzf elasticsearch-6.5.4.tar.gzcd elasticsearch-6.5.4/

Compares the SHA of the downloaded .tar.gz archive and the published checksum, which should outputelasticsearch-{version}.tar.gz: OK.

This directory is known as $ES_HOME.

Alternatively, you can download the following package, which includes onlyApache 2.0 licensed code:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-6.5.4.tar.gz

Enable automatic creation of X-Pack indicesedit

X-Pack will try to automatically create a number of indices within Elasticsearch.By default, Elasticsearch is configured to allow automatic index creation, and noadditional steps are required. However, if you have disabled automatic indexcreation in Elasticsearch, you must configureaction.auto_create_index in elasticsearch.yml to allowX-Pack to create the following indices:

action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*

If you are using Logstashor Beats then you will most likelyrequire additional index names in your action.auto_create_index setting, andthe exact value will depend on your local configuration. If you are unsure ofthe correct value for your environment, you may consider setting the value to * which will allow automatic creation of all indices.

Running Elasticsearch from the command lineedit

Elasticsearch can be started from the command line as follows:

./bin/elasticsearch

By default, Elasticsearch runs in the foreground, prints its logs to thestandard output (stdout), and can be stopped by pressing Ctrl-C.

All scripts packaged with Elasticsearch require a version of Bashthat supports arrays and assume that Bash is available at /bin/bash.As such, Bash should be available at this path either directly or via asymbolic link.

Checking that Elasticsearch is runningedit

You can test that your Elasticsearch node is running by sending an HTTPrequest to port 9200 on localhost:

GET /

which should give you a response something like this:

{"name" : "Cp8oag6","cluster_name" : "elasticsearch","cluster_uuid" : "AT69_T_DTp-1qgIJlatQqA","version" : {"number" : "6.5.4","build_flavor" : "default","build_type" : "zip","build_hash" : "f27399d","build_date" : "2016-03-30T09:51:41.449Z","build_snapshot" : false,"lucene_version" : "7.5.0","minimum_wire_compatibility_version" : "1.2.3","minimum_index_compatibility_version" : "1.2.3"},"tagline" : "You Know, for Search"}

Log printing to stdout can be disabled using the -q or --quietoption on the command line.

Running as a daemonedit

To run Elasticsearch as a daemon, specify -d on the command line, and recordthe process ID in a file using the -p option:

./bin/elasticsearch -d -p pid

Log messages can be found in the $ES_HOME/logs/ directory.

To shut down Elasticsearch, kill the process ID recorded in the pid file:

kill `cat pid`

The startup scripts provided in the RPM and Debianpackages take care of starting and stopping the Elasticsearch process for you.

Configuring Elasticsearch on the command lineedit

Elasticsearch loads its configuration from the $ES_HOME/config/elasticsearch.ymlfile by default.The format of this config file is explained inConfiguring Elasticsearch.

Any settings that can be specified in the config file can also be specified onthe command line, using the -E syntax as follows:

./bin/elasticsearch -d -Ecluster.name=my_cluster -Enode.name=node_1

Typically, any cluster-wide settings (like cluster.name) should beadded to the elasticsearch.yml config file, while any node-specific settingssuch as node.name could be specified on the command line.

Directory layout of .zip and .tar.gz archivesedit

The .zip and .tar.gz packages are entirely self-contained. All files anddirectories are, by default, contained within $ES_HOME?—?the directorycreated when unpacking the archive.

This is very convenient because you don’t have to create any directories tostart using Elasticsearch, and uninstalling Elasticsearch is as easy asremoving the $ES_HOME directory.However, it is advisable to change thedefault locations of the config directory, the data directory, and the logsdirectory so that you do not delete important data later on.

TypeDescriptionDefault LocationSetting

home

Elasticsearch home directory or $ES_HOME

Directory created by unpacking the archive

bin

Binary scripts including elasticsearch to start a nodeand elasticsearch-plugin to install plugins

$ES_HOME/bin

conf

Configuration files including elasticsearch.yml

$ES_HOME/config

ES_PATH_CONF

data

The location of the data files of each index / shard allocatedon the node. Can hold multiple locations.

$ES_HOME/data

path.data

logs

Log files location.

$ES_HOME/logs

path.logs

plugins

Plugin files location. Each plugin will be contained in a subdirectory.

$ES_HOME/plugins

repo

Shared file system repository locations. Can hold multiple locations. A file system repository can be placed in to any subdirectory of any directory specified here.

Not configured

path.repo

script

Location of script files.

$ES_HOME/scripts

path.scripts

Next stepsedit

You now have a test Elasticsearch environment set up.Before you startserious development or go into production with Elasticsearch, you must do some additionalsetup:

Learn how to configure Elasticsearch.Configure important Elasticsearch settings.Configure important system settings.
免責聲明:非本網注明原創的信息,皆為程序自動獲取互聯網,目的在于傳遞更多信息,并不代表本網贊同其觀點和對其真實性負責;如此頁面有侵犯到您的權益,請給站長發送郵件,并提供相關證明(版權證明、身份證正反面、侵權鏈接),站長將在收到郵件12小時內刪除。

一周熱門

查看更多
亚博电子 <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <文本链> <文本链> <文本链> <文本链> <文本链> <文本链>