ES安装配置7.5.2

参考地址

英文  第二个地址中文。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 ,将 * 改为用户名( es
elasticsearch soft nproc 4096
root soft nproc unlimited
启动
cd  /usr/local/elasticsearch7
./bin/elasticsearch
如果你想把 Elasticsearch 作为一个守护进程在后台运行,那么可以在后面添加参数  -d 

Failure running machine learning native code

ElasticsearchException[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 成功

kibana 安装步骤 

 

配置环境变量

 chown -R es:es /usr/local/elasticsearch7 适用 es 用户运行 kibana

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值