参考地址
英文 第二个地址中文。https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html 这个是 不同机器安装方法列表Install Elasticsearch from archive on Linux or MacOS | Elasticsearch Guide [7.16] | Elastichttps://www.elastic.co/guide/en/elasticsearch/reference/current/targz.html
安装并运行 Elasticsearch | Elasticsearch: 权威指南 | Elastichttps://www.elastic.co/guide/cn/elasticsearch/guide/current/running-elasticsearch.htmlreadme
= Elasticsearch
Elasticsearch is the distributed, RESTful search and analytics engine at the
heart of the https://www.elastic.co/products[Elastic Stack]. You can use
Elasticsearch to store, search, and manage data for:
* Logs
* Metrics
* A search backend
* Application monitoring
* Endpoint security
... and more!
To learn more about Elasticsearch's features and capabilities, see our
https://www.elastic.co/products/elasticsearch[product page].
[[get-started]]
== Get started
The simplest way to set up Elasticsearch is to create a managed deployment with
https://www.elastic.co/cloud/as-a-service[Elasticsearch Service on Elastic
Cloud].
If you prefer to install and manage Elasticsearch yourself, you can download
the latest version from
https://www.elastic.co/downloads/elasticsearch[elastic.co/downloads/elasticsearch].
For more installation options, see the
https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html[Elasticsearch installation
documentation].
[[upgrade]]
== Upgrade
To upgrade from an earlier version of Elasticsearch, see the
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html[Elasticsearch upgrade
documentation].
[[build-source]]
== Build from source
Elasticsearch uses https://gradle.org[Gradle] for its build system.
To build a distribution for your local OS and print its output location upon
completion, run:
----
./gradlew localDistro
----
To build a distribution for another platform, run the related command:
----
./gradlew :distribution:archives:linux-tar:assemble
./gradlew :distribution:archives:darwin-tar:assemble
./gradlew :distribution:archives:windows-zip:assemble
----
To build distributions for all supported platforms, run:
----
./gradlew assemble
----
Distributions are output to `distributions/archives`.
To run the test suite, see xref:TESTING.asciidoc[TESTING].
[[docs]]
== documentation
For the complete Elasticsearch documentation visit
https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html[elastic.co].
For information about our documentation processes, see the
xref:docs/README.asciidoc[docs README].
[[contribute]]
== Contribute
For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING].
[[questions]]
== Questions? Problems? Suggestions?
* To report a bug or request a feature, create a
https://github.com/elastic/elasticsearch/issues/new/choose[GitHub Issue]. Please
ensure someone else hasn't created an issue for the same topic.
* Need help using Elasticsearch? Reach out on the
https://discuss.elastic.co[Elastic Forum] or https://ela.st/slack[Slack]. A
fellow community member or Elastic engineer will be happy to help you out.
Version:0.9 StartHTML:0000000105 EndHTML:0000000461 StartFragment:0000000141 EndFragment:0000000421
Version:0.9 StartHTML:0000000105 EndHTML:0000000601 StartFragment:0000000141 EndFragment:0000000561
下载安装jdk
jdk *** 作参考地址
linux 系统 rpm 格式JDK安装,卸载_深蓝之翼的博客-CSDN博客_rpm 卸载jdk
http://www.jdkdownload.com/
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm // 下载
rpm -ivh jdk-17_linux-x64_bin.rpm // 安装
查看 java 版本
java -version
配置环境变量
export ES_JAVA_HOME=/usr/java/jdk-17.0.1
export PATH=$PATH:$ES_JAVA_HOME/bin:/usr/local/elasticsearch7/bin
rpm 卸载
rpm -qa | grep jdk // 查看rpm 安装的 jdk
rpm -e --nodeps // 卸载
如下图中 *** 作
下载安装
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.2-darwin-x86_64.tar.gz mv ./elasticsearch-7.15.2 /usr/local/elasticsearch7 export PATH=$PATH:/usr/local/elasticsearch7/bin配置信息
vi /etc/local/elasticsearch7/config/elasticsearch.yml network.host: 0.0.0.0 http.cors.enabled: true http.cors.allow-origin: "*“ path.data: /var/elasticsearch/data path.logs: /var/elasticsearch/logs vi /etc/elasticsearch7/config/jvm.options -Xms256m -Xmx256m sysctl -w vm.max_map_count=262144 groupadd es useradd -r -g es es chown -R es:es /usr/local/elasticsearch7 如果有其它文件权限不足则 赋予es 用户对应文件夹权限 比如上面的配置的日志问价夹 chown -R es:es /对应文件夹 然后再配置如下配置信息 , 在结尾处 /etc/security/limits.conf es soft nofile 65536 es hard nofile 65536 es soft nproc 4096 es hard nproc 4096 vi 编辑 vi /etc/security/limits.d/20-nproc.conf ,将 * 改为用户名( elasticsearch ) elasticsearch soft nproc 4096 root soft nproc unlimited 启动 cd /usr/local/elasticsearch7 ./bin/elasticsearch 如果你想把 Elasticsearch 作为一个守护进程在后台运行,那么可以在后面添加参数 -d 报错 处理方式 https://blog.csdn.net/QQ98281642/article/details/121014504 Failure running machine learning native codeElasticsearchException[Failure running machine learning native code. This could be due to running on an unsupported OS or distribution, missing OS libraries, or a problem with the temp directory. To bypass this problem by running Elasticsearch without machine learning functionality set [xpack.ml.enabled: false].]
1. java.lang.RuntimeException: can not run elasticsearch as root 原因: elasticsearch 不支持 root 启动 解决:创建一个用户 es ,然后 su 到 es 用户下启动 elasticsearch 2. bootstrap check failure [1] of [2]: max virtual memory areas vm.max_map_count [65530] is too low , increase to at least [262144] 原因:配置的虚拟内存过小 解决:在 root 用户下执行 sysctl -w vm.max_map_count=262144 3. bootstrap check failure [2] of [2]: the default discovery settings are unsuitable for production use; at least one of 原因:没配置集群节点名称 解决:在配置 elasticsearch.yml 中配置 cluster.initial_master_nodes: ["node-1"] ./bin/elasticsearch 成功欢迎分享,转载请注明来源:内存溢出
评论列表(0条)