Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps to install Elasticsearch under Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the steps of installing Elasticsearch under Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of installing Elasticsearch under Linux.

Installation and deployment 1. Linux installation

Download address: https://www.elastic.co/cn/downloads/past-releases#elasticsearch

Step 1: upload Linux and decompress

Upload Linux server: rz Elasticsearch 6.7.2 extract Es:sudo tar xvf Elasticsearch 6.7.2

Step 2: modify the configuration file

Step 3: start Es

[dev@lihuan1-dev.bj1.haodf.net elasticsearch-6.7.2] $. / bin/elasticsearch Note: start sh elasticsearch.sh & nohup sh elasticsearch & nohup sh elasticsearch.sh & in the background

Question 1:java.nio.file.AccessDeniedException:Exception in thread "main" java.nio.file.AccessDeniedException: / home/elasticsearch/elasticsearch-6.7.2/config/jvm.options

Reason: current user does not have execute permission

Insufficient permissions: [dev@lihuan1-dev.bj1.haodf.net elasticsearch-6.7.2] $chown-R dev:dev elasticsearch-6.7.2

Question 2: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

Reason: the memory permission of the user is too small, at least 262144.

Solution: solution one

Switch to root user

Execute the command: sysctl-w vm.max_map_count=262144

View result: sysctl-a | grep vm.max_map_count

Display: vm.max_map_count = 262144

Solution: solution 2

[dev@lihuan1-dev.bj1.haodf.net elasticsearch-6.7.2] $sudo vim / etc/sysctl.conf vm.max_map_count= 655360 [dev @ lihuan1-dev.bj1.haodf.net elasticsearch-6.7.2] $sudo sysctl-p

Problem 3:system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

Reason: this is because Centos6 does not support SecComp, and the default bootstrap.system_call_filter of ES5.2.0 is true for detection, so the detection fails. After the failure, ES cannot be started directly.

Solution: configure bootstrap.system_call_filter to false in elasticsearch.yml

Note that under Memory:

Bootstrap.memory_lock: false bootstrap.system_call_filter: false

Question 4: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]

Solution: modify / etc/security/limits.conf file

# End of file* soft nofile 65536 * hard nofile 65536 * soft nproc 6552 "/ etc/security/limits.conf" [converted] 53L, 1883C

Use ulimit-Hn to view the current value

[dev@lihuan1-dev.bj1.haodf.net bin] $sudo vim / etc/profile [dev@lihuan1-dev.bj1.haodf.net bin] $ulimit-Hn65535

Note: exit user restart after modification, and then ulimit-Hn to check the current value, which has changed.

2. Mac installation

Step 1: download the official website

Step 2: extract the file

Step 3: switch the terminal to the bin directory

/ Documents/opt/elasticsearch-cluster/elasticsearch-7.2.1/elasticsearch-7.2.1/bin

Step 4: start es

Sh elasticsearch

Step 5: verify the results

Http://localhost:9200/{ "name": "node-0", "cluster_name": "es-cluster-7.2.1", "cluster_uuid": "Fv0qn48ET1W7xvReE6QfcA", "version": {"number": "7.2.1", "build_flavor": "default", "build_type": "tar", "build_hash": "fe6cb20" "build_date": "2019-07-24T17:58:29.979462Z", "build_snapshot": false, "lucene_version": "8.0.0", "minimum_wire_compatibility_version": "6.8.0", "minimum_index_compatibility_version": "6.0.0-beta1"}, "tagline": "You Know, for Search"} I believe you have a deeper understanding of the "steps to install Elasticsearch under Linux", so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report